What is the best way to execute 2 if conditions in MATLAB
Mostra commenti meno recenti
assume w=[1 2 2 2]
q=[2 1 1 1]
if w(i)==1
do somehing
else
look to q(i)
if q(i)==1
do some thing
else
do somthing
end
end
Risposta accettata
Più risposte (1)
Walter Roberson
il 30 Apr 2014
if w(i) == 1
do somehing
elseif q(i) == 1
do some thing
else
do somthing
end
2 Commenti
yousef Yousef
il 30 Apr 2014
José-Luis
il 1 Mag 2014
It will check nothing. It will run that bit only if any of the first two conditions are not satisfied.
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!