Running an if function
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I want to run an If function. So if x<3 then I want function "Runningwater" to be executed. How can I implement this as code?
thanks guys
0 Commenti
Risposta accettata
Geoff Hayes
il 21 Gen 2015
if x < 3
Running water;
end
2 Commenti
Geoff Hayes
il 21 Gen 2015
The double ampersand is used for and, and the double pipe for or. For the and, you would do
if x<3 && y>4
Runningwater;
end
For the or, you would do
if x<3 || y>4
Runningwater;
end
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Dynamic System Models in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!