Dear community, I am trying to store different vectors 1 x N inside a Matrix M x N. The issue in doing this is that the vectors have not the same length N (which is variable for each row) and thus each row M does not have the same number of columns N. I've tried to allocate a zero matrix in advance so that deltas could have been filled in by zeros, but it is not working. How can I overcome this ?
example: A=zeros (8) A(3)=[1 2 3 4] A(1)=[2 6 7 9] A(2)=[4 6 6 7 8 9 1 3]
A(3) and A(1) assignments are returning me an error while A(2) assignment not. For those arrays < 8 elements, I was hoping to get 0s as fill ups to comply to the matrix's length.
Please advise…
Best Answer