How to check if an array is empty without using any built in functions
Mostrar comentarios más antiguos
x = [];
x == [] , gives 0×0 empty logical array...
Respuesta aceptada
Más respuestas (1)
Sulaymon Eshkabilov
el 4 de Sept. de 2021
x=[];
[R,C]=size(x)
if R==0 & C==0
disp('Empty')
else
disp('Contains STH')
end
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!