two inputs and two equations
Ältere Kommentare anzeigen
hey !
is there a way to write a script/funtion/loop that understand i have two inputs (one is set and the second reminds "empty") and two equations with the same output, take the right equation and calculate my output ? eg
i have two possible inputs: Hp and Hkom
equations:
V = 12 + 3.2*Hp
or
V = 12 + 4*Hkom
i want matlab to understand that if i set one input Hp = 12 the second imput Hkom should be neclacted and take the write equation: V = 12 + 3.2*Hp
and calculate my V ??
3 Kommentare
darova
am 4 Feb. 2020
What have you tried? Did you try if..else statement?
Please provide some of your attempts
Aleksandra Ksiezyk
am 4 Feb. 2020
John D'Errico
am 4 Feb. 2020
As I pointed out, you still really do need to use an if, in some form.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Programming finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!