if condition inside another

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 个评论

What is the unexpected result? Posting the code might offer some more clues.
Are you stepping through the code with the debugger to see which blocks it enters and which it does not enter?

请先登录,再进行评论。

 采纳的回答

Jan
Jan 2014-5-4

1 个投票

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.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Octave 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by