Hello, for example i have
A = [1,2;2,4;3,NaN;NaN,5;NaN,7]res = cellfun(@(x) find (~isnan(x)),num2cell(A,1),'un',0) % Here i store in the index of the numbers that are not NaN
res is a 1×2 cell array, the first component is a 3×1 double and the second one is a 4×1 double.
res{1} = 1 2 3res{2} = 1 2 4 5
My question is to do a table or a double, or a matrix that each res{j} is stored in the respective j column of the new table I tried a cell2mat, but since they aren't the same size it doesn't work. the goal is to make
output = 1 1 2 2 3 4 (empty or NaN or whatever) 5
Best Answer