Error in outputting a variable from function
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
Have a problem in trying to graph the outputs of my height function in my main file.
Respuestas (1)
James Tursa
el 23 de Feb. de 2018
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 comentario
Alexander Donaldson
el 24 de Feb. de 2018
Editada: Alexander Donaldson
el 24 de Feb. de 2018
La pregunta está cerrada.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!