forked from Donut-the-1st/Truss-Solver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNodes.m
33 lines (30 loc) · 830 Bytes
/
Nodes.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
classdef Nodes
%UNTITLED3 Summary of this class goes here
% Detailed explanation goes here
properties
x {double}
y {double}
ID %Propritary for old functions
Thiccness = 0;
end
methods
function obj = Nodes(x,y,ID)
%Nodes Construct an instance of this class
% Makes ONE node, to create an array do:
% a(x,y) = Nodes() then fill the array
% Nodes(x,y,0) doesn't assign an ID
if nargin == 0
obj.x = 0;
obj.y = 0;
obj.ID = -1;
elseif ID ~= 0
obj.x = x;
obj.y = y;
obj.ID = ID;
else
obj.x = x;
obj.y = y;
end
end
end
end