Borrar filtros
Borrar filtros

if condition inside another

3 visualizaciones (últimos 30 días)
yousef Yousef
yousef Yousef el 3 de Mayo de 2014
Respondida: Jan el 4 de Mayo de 2014
I want to write if condition inside if condition such that
if ...
'statement'
elseif...
'statement'
if....
'statement'
else
'statement'
end
else
'statement'
end
Is there a logical problem here, because the program gives me an unexpected result?
Thanks
  2 comentarios
Geoff Hayes
Geoff Hayes el 3 de Mayo de 2014
What is the unexpected result? Posting the code might offer some more clues.
Image Analyst
Image Analyst el 3 de Mayo de 2014
Are you stepping through the code with the debugger to see which blocks it enters and which it does not enter?

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 4 de Mayo de 2014
The shown pseudo code does not contain any logical problems. This means, that the problem is concealed in the 'statement' parts or in the arguments of the if commands abbreviated as '...' in your code.
This answer is trivial, but the best I can find based on your question. Please add more details be editing your question.

Más respuestas (0)

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by