### Possible Answer

... (condition statement) (matlab commands) elseif (condition statement) ... This last example demonstrates one of the bad habits that Matlab allows you to get away with. - read more

> Please suggest how can I do this for 1 line in matlab??? ... This *could* be done in one line, but it wouldn't be as efficient. Subject: How to ... - read more

Please vote if the answer you were given helped you or not, thats the best way to improve our algorithm. You can also submit an answer or search documents about one line if statements matlab.