Generate matrix from non empty cells from another cell array

2 vues (au cours des 30 derniers jours)
Islam Hassan
Islam Hassan le 10 Juil 2020
Commenté : Islam Hassan le 10 Juil 2020
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?

Réponse acceptée

madhan ravi
madhan ravi le 10 Juil 2020
c = cell_array.';
ix = cellfun('isempty',c);
w = cellfun(@flip,c(~ix),'un',0);
Wanted = cat(1, w{:})
  4 commentaires
madhan ravi
madhan ravi le 10 Juil 2020
Then don’t transpose ;).
Islam Hassan
Islam Hassan le 10 Juil 2020
Thanks a lot

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by