empty double matrix in case of nul value

25 visualizaciones (últimos 30 días)
abdul rehman
abdul rehman el 10 de Jul. de 2021
Comentada: abdul rehman el 10 de Jul. de 2021
I am receiving the message "4x0 empty double matrix ". when the output is nul. I want it to be 0. when its empty
code line:
malicious=n_selfish_veh(n_selfish_veh(:,3) & n_selfish_veh(:,4) < time_ee ,:)

Respuestas (1)

James Tursa
James Tursa el 10 de Jul. de 2021
Do you mean you want to do something like this:
if( isempty(malicious) )
malicious = 0;
end
  1 comentario
abdul rehman
abdul rehman el 10 de Jul. de 2021
can we do it without if condition such as , isnan(malacious)=0 but its not working properly

Iniciar sesión para comentar.

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by