two inputs and two equations
Show older comments
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 Comments
darova
on 4 Feb 2020
What have you tried? Did you try if..else statement?
Please provide some of your attempts
Aleksandra Ksiezyk
on 4 Feb 2020
John D'Errico
on 4 Feb 2020
As I pointed out, you still really do need to use an if, in some form.
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!