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!