two inputs and two equations
古いコメントを表示
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 件のコメント
darova
2020 年 2 月 4 日
What have you tried? Did you try if..else statement?
Please provide some of your attempts
Aleksandra Ksiezyk
2020 年 2 月 4 日
John D'Errico
2020 年 2 月 4 日
As I pointed out, you still really do need to use an if, in some form.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!