a1=[2]; a2=[29 3]; a3=[3 2];
I will change them to cell array first for indexing, it is always my preference.
a(1)=num2cell(a1);
a(2)=num2cell(a2);
a(3)=num2cell(a3);
How to know the number of variable?
numVar = length(a);
numVar = numel(a);
numVar = size(a,2);
display your variable
2 Comments
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/425443-storing-vectors-in-a-cluster#comment_626178
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/425443-storing-vectors-in-a-cluster#comment_626178
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/425443-storing-vectors-in-a-cluster#comment_626179
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/425443-storing-vectors-in-a-cluster#comment_626179
Sign in to comment.