MATLAB: I am defining the nodes . the first set is how i want it but when i run it, it gives me the error of #Subscript indices must either be real positive integers or logicals but if i swap the last two enteries it works fine

paiuia

crackplanenodes = [ 4 0 7; 4 0.5 7; 4 1 7; 10 0 7; 10 0.5 7; 10 1 7] crackplanenodes = [ 4 0 7; 4 0.5 7; 4 1 7; 10 0 7; 10 7 0.5; 10 7 1]

Best Answer

It works fine either way. What matters is what you will do with that array AFTERWARDS.
crackplanenodes = [ 4 0 7; 4 0.5 7; 4 1 7; 10 0 7; 10 0.5 7; 10 1 7]
crackplanenodes =
4 0 7
4 0.5 7
4 1 7
10 0 7
10 0.5 7
10 1 7
crackplanenodes = [ 4 0 7; 4 0.5 7; 4 1 7; 10 0 7; 10 7 0.5; 10 7 1]
crackplanenodes =
4 0 7
4 0.5 7
4 1 7
10 0 7
10 7 0.5
10 7 1