I am trying to compute the code seen below, in a more clever way, using MatLAB:
f=zeros(5,2) %Values irrelevant.
y = {'A1', 'B1';
f(1,1) f(1,2);
f(2,1) f(2,2);
f(3,1) f(3,2);
f(4,1) f(4,2);
f(5,1) f(5,2)};
What I get out is the f
matrix with the text of A1
and B1
above the two vectors.
I suppose there is a simpler way to write this, for more complex purposing, but I've tried any combination of parenthesis, brackets and curly brackets, num2str
that I could think of.
Any suggestions?