In MATLAB, if N = 2
this is the line I need:
M = [V(1)*ones(1,L(1)) V(2)*ones(1,L(2))];
If N = 3
, the line is:
M = [V(1)*ones(1,L(1)) V(2)*ones(1,L(2)) V(3)*ones(1,L(3))];
How could I write a line producing the same results for an arbitrary N
?