exiting code if condition is met

6 vues (au cours des 30 derniers jours)
Max
Max le 11 Nov 2015
Commenté : Thorsten le 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

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by