empty double matrix in case of nul value

조회 수: 17 (최근 30일)
abdul rehman
abdul rehman 2021년 7월 10일
댓글: abdul rehman 2021년 7월 10일
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 ,:)

답변 (1개)

James Tursa
James Tursa 2021년 7월 10일
Do you mean you want to do something like this:
if( isempty(malicious) )
malicious = 0;
end
  댓글 수: 1
abdul rehman
abdul rehman 2021년 7월 10일
can we do it without if condition such as , isnan(malacious)=0 but its not working properly

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by