I have created cell arrays and put values using the loop.. Here is what I have done:
mycell =cell(1,100,num); %% assume num anything
idx = 1;
[a,b] = size(depth);
for i=1:a
for j=1:b
if isfinite(depth(i,j))
for segId=1:2
mycell{:,idx,segId} = depth(i,j);
idx=idx+1;
In the end i got result like this:
mycell(;,:,1) =
[1] [1.2] [1.222] [] [] [] [0.7] [06] [] [0.34] .....[100n]
mycell(;,:,2) =
[] [] [] [1.33] [0.5] [0.3] [] [] [0.5] [] .....[100n]
Is there any way I can delete the empty cell in these cell arrays...
Or is there any way I can get an output like this: - [1*9 values][1*88 values] and so on... like on cell array and get values in one cell...I am unable to do this because of this loop.