Problem with ''if''
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi everyone, I have this variable:
values =
[] [1x27 char] [1x32 char] [1x28 char] [1x34 char]
and i want have a check for empty cells. I use :
if values[ ]==[ ]
....
end
But unfortunately....
??? Conversion to logical from cell is not possible. What can i do???
0 Commenti
Risposta accettata
Robert Cumming
il 20 Lug 2011
cellfun ( @isempty, values )
5 Commenti
Oleg Komarov
il 20 Lug 2011
idx = cellfun('isempty',values);
find(~idx,1,'first')
Finds the location of the first non-empty.
Più risposte (0)
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!