필터 지우기
필터 지우기

How to Check dimension mismatch of an element?

조회 수: 2 (최근 30일)
tabw
tabw 2014년 8월 20일
답변: Iain 2014년 8월 20일
My question is a not very clear.
EG let s say, q , 1X2 array. q(1)=1 q(2)=2 q(3) does not exist
What I want is that I need to Check q(3) exist or not. If q(3) does not exist, break the while loop.
How to write the code to do that
I tried t=isempty(q(3)); However, it is not empty but not existing. So how to do that?
Thanks

채택된 답변

Iain
Iain 2014년 8월 20일
numel(q) < 3

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by