This is a simplified version of the project I am doing. I can get around this using other methods. I was just wondering, is it possible to do this in matlab ? I want to store a
You can use 3-d matrix instead of 2-d matrix if you already know the length of vector.
a = zeros (2,2,2) ; a(1,1,:) = [100, 100] ;
or
a = []; a (1,1,:) = [100,100];
In above example, you have to take care of indexing by yourself and matrix a can be in arbitrary dimensions.