How to check if an array is empty without using any built in functions
Afficher commentaires plus anciens
x = [];
x == [] , gives 0×0 empty logical array...
Réponse acceptée
Plus de réponses (1)
Sulaymon Eshkabilov
le 4 Sep 2021
x=[];
[R,C]=size(x)
if R==0 & C==0
disp('Empty')
else
disp('Contains STH')
end
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!