Hello
I wanna creat a code for a loop for a matrix which creat nodal points (for 4 legs in 3d-koordinate system) in a matrix. I can make it creat the nodal point for 1 leg with this code:
le=1;
d=5;
for no=1:d
x1=no*le;
x2=(no-1)*le;
x3=0
nodal(no,:) = [x1 x2 x3
] ;
end
disp(nodal);
but what i want it to restart after 5 point and make a matrix like this.
1 0 0 0
2 0 0 2
3 0 0 4
4 0 0 6
5 0 0 8
6 1 0 0
7 1 0 2
8 1 0 4
9 1 0 6
10 1 0 8
11 0 1 0
12 0 1 2
13 0 1 4
14 0 1 6
15 0 1 8
16 1 1 0
17 1 1 2
18 1 1 4
19 1 1 6
20 1 1 8
I have tryed to make more loops, but nothing it working. I hope somebody can help - thanks!