I have variables in workspace like this: from P1 to P28 (structure array). I want to save them in P to call them like this (these are points for my robot):
MOVE1 = rmove( Kawasaki, P(1:28) );
Best Answer
How i repair it:
Make P:
P = [ rpoint(0,0,0,0,0,0,'signal', [],'pulse', [], 'wait', 0) ];
This would actually be horribly slow, pointlessly complex, obfuscated, and very buggy way to write your code. You would make your code hard to debug, and a pain to work with. Read this to know why:
Usingindexing would be simple, neat, and very efficient. You should useone array andindexing.Indexing is the solution you should be using, because it is the most efficient way to write MATLAB code, is simple, neat, and very easy to debug.Indexing is explained quite well in the MATLAB introductory tutorials, which are highly recommended for all beginners:
Best Answer