Problems with and/or commands...
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MC3105
le 17 Nov 2014
Réponse apportée : Star Strider
le 17 Nov 2014
Hey everyone,
I am using an if-condition within a loop. The loop is t=1:100.
The if-condition is
t>=sz1 && t<=sz2
ZZ(t)=2;
elseif t>=sz3 && t<=sz4
ZZ(t)=2;
elseif t>=sz5 && t<=sz6
ZZ(t)=2;
else
ZZ(t)=1;
end
sz1...sz6 represent number that I have defined earlier.
Now matlab gives me the following errors message: Operands to the and && operators must be convertible to logical scalar values.
What did I do wrong??
Thanks a lot!!
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Electrical Block Libraries 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!