I have written a bunch of code but I would like to ignore it if and a condition is met. so for
if length(dict)=1
newguess=dict
end
%bunch of code
I want to ignore all that code if my if statement is met and just stop if length(dict)=1

 채택된 답변

Thorsten
Thorsten 2015년 11월 11일

0 개 추천

if length(dict)=1
newguess=dict
else
%bunch of code
end

댓글 수: 3

Max
Max 2015년 11월 11일
thanks just a follow up question how do i find the length of a cell. say dict={'aa';'aal';'aalii';'aam';'aani'} dict has 5 words in it how do I find when it has just one for an if statement.
n = numel(dict);
n = numel(dict);

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

Max
2015년 11월 11일

댓글:

2015년 11월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by