isempty
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, could anyone point out how to check a empty set?
I try isempty, seems wrong
a = [1 3 2]
a =
1 3 2
K>> b = [1 3 2]
b =
1 3 2
K>> d = setdiff(a, b)
d =
Empty matrix: 1-by-0
K>> isempty(d)
ans =
Empty matrix: 1-by-0
5 Kommentare
Akzeptierte Antwort
Matt Tearle
am 6 Mär. 2011
Problem seems to have been resolved (see above comments), but for the record:
isempty(x)
Another possibility would be
~numel(x)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays 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!