second expression and second statement doesn't excuted in else if ?
Mostrar comentarios más antiguos
why the second condition and second statments don't take into account (doeasn't excuted ) ? when I excuted the code only the first condition and its statment excuted as well as to the last statement
if condition 1
do some calculation 1
elseif condition 2
do some calculation 2
else
do some calculation 3
end
3 comentarios
Torsten
el 24 de Ag. de 2022
The most probable answer is: condition 2 was never true.
To tell you something more useful, we have to see your code.
omar th
el 24 de Ag. de 2022
It could be that the second conditon was never true when the first condition was false.
if true % 1st condition always true
elseif true % 2nd condition also always true but never checked
else
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!