How to check if an array is empty without using any built in functions
Ältere Kommentare anzeigen
x = [];
x == [] , gives 0×0 empty logical array...
Akzeptierte Antwort
Weitere Antworten (1)
Sulaymon Eshkabilov
am 4 Sep. 2021
x=[];
[R,C]=size(x)
if R==0 & C==0
disp('Empty')
else
disp('Contains STH')
end
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!