How to find a certain content with index in cell array by looping
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Khaing Zin Htwe
am 30 Jul. 2016
Kommentiert: Khaing Zin Htwe
am 31 Jul. 2016
Dear senior,
I have a cell array like the following code. I want to sort like the following answer . How can I solve this? Help me. Thanks all.
if true
% 4 [] [] []
5 6 [] []
7 8 9 10
Desired Answer: 1x1 cell
4
5
6
7
8
9
10
end
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 30 Jul. 2016
A={4 [] [] []
5 6 [] []
7 8 9 10}
B=A'
idx=~cellfun(@isempty,B)
out=B(idx)
4 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Structures finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!