Is it possible in Matlab to create array of matrices which have different size. For example
Array_Mat(:,:,1) = zeros(3);
Array_Mat(:,:,2) = zeros(4);
This gives error. How I can make array of matrices then?
Is it possible in Matlab to create array of matrices which have different size. For example
Array_Mat(:,:,1) = zeros(3);
Array_Mat(:,:,2) = zeros(4);
This gives error. How I can make array of matrices then?
You can use cells.
>> a{1}=[1 2 ;3 4]
a =
[2x2 double]
>> a{2}=zeros(4)
a =
[2x2 double] [4x4 double]
>> a{1}(2,1)
ans =
3
>> a{2}(3,4)
ans =
0