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!