How to find a certain content with index in cell array by looping
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Khaing Zin Htwe
il 30 Lug 2016
Commentato: Khaing Zin Htwe
il 31 Lug 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 Commenti
Risposta accettata
Azzi Abdelmalek
il 30 Lug 2016
A={4 [] [] []
5 6 [] []
7 8 9 10}
B=A'
idx=~cellfun(@isempty,B)
out=B(idx)
4 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Data Type Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!