Error in outputting a variable from function
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
Have a problem in trying to graph the outputs of my height function in my main file.
0 件のコメント
回答 (1 件)
James Tursa
2018 年 2 月 23 日
Change your switch-case logic to if-then-else logic. E.g.,
switch h >= 0 && h <= 105
case h >= 0 && h < 11
:
case h >= 11 && h < 25
:
Would become this:
if h >= 0 && h < 11
:
elseif h >= 11 && h < 25
:
etc
:
else
error('Invalid height'); % catch invalid inputs here
end
1 件のコメント
Alexander Donaldson
2018 年 2 月 24 日
編集済み: Alexander Donaldson
2018 年 2 月 24 日
この質問は閉じられています。
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!