exiting code if condition is met

4 Ansichten (letzte 30 Tage)
Max
Max am 11 Nov. 2015
Kommentiert: Thorsten am 12 Nov. 2015
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

Akzeptierte Antwort

Thorsten
Thorsten am 11 Nov. 2015
if length(dict)=1
newguess=dict
else
%bunch of code
end
  3 Kommentare
Thorsten
Thorsten am 12 Nov. 2015
n = numel(dict);
Thorsten
Thorsten am 12 Nov. 2015
n = numel(dict);

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by