Generate matrix from non empty cells from another cell array

1 次查看(过去 30 天)
I have a cell matrix like this
I need to generate matrix for the non empty cell in these format and arrange row by row ( form above to below)
A = [ 16 3
21 3
16 4
22 4
4 5
9 5
16 5
22 5
. . ] so on.
How can we do that?

采纳的回答

madhan ravi
madhan ravi 2020-7-10
c = cell_array.';
ix = cellfun('isempty',c);
w = cellfun(@flip,c(~ix),'un',0);
Wanted = cat(1, w{:})
  4 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by