MATLAB: If condition inside another

if statement

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

Best Answer

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.