-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJoint.m
51 lines (42 loc) · 1.09 KB
/
Joint.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
%% VERSION 1: Valerio Dodet - DATE: 20/06/2016
classdef Joint
properties
X=0;
Y=0;
Name;
end
methods
function joint = Joint(X,Y,name)
if (nargin>0)
joint.X=X;
joint.Y=Y;
joint.Name=name;
end
end
function [X]= GetX(joint )
X=joint.X;
return;
end
function [Y]= GetY(joint )
Y=joint.Y;
return;
end
function [Name]= GetName(joint )
Name=joint.Name;
return;
end
% sameName controlla se la stringa passata è simile al nome del
% joint
function ok = sameName(joint, stringa)
sizeS=size(stringa);
if sizeS<=size(joint.Name),
if joint.Name(1:size(2))==stringa,
ok = 1;
end
else
ok = 0;
end
return;
end
end
end