isempty is allways zero
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Nik Rocky
il 27 Mag 2020
Commentato: Walter Roberson
il 27 Mag 2020
Hello,
im using isempty:
TP =
0 0 0
>> isempty(TP)
ans =
logical
0
>> TP(3) = 1
TP =
0 0 1
>> isempty(TP)
ans =
logical
0
Why is locical answer still zero? What can I do? I need to check multiple arrays for empty or not in if-else blocks.
0 Commenti
Risposta accettata
Fangjun Jiang
il 27 Mag 2020
zero and empty are different
isempty([])
isempty(0)
isempty('')
4 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Argument Definitions 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!