I am using eval function but even if I put semicolon ";" at the end of the line Matlab shows the output in the command window.
Is it possible to not display the result in the command window?
Best Answer
"I am using eval function but"
Don't useeval. It's one of those functions that's there but not to be used unless absolutely necessary, which is almost never.eval creates very inefficient, hard-to-debug codes.
This would actually be horribly slow, pointlessly complex, obfuscated, and very buggy way to write your code. You would make your code hard to debug, and a pain to work with. Read this to know why:
Usingindexing would be simple, neat, and very efficient. You should useone array andindexing.Indexing is the solution you should be using, because it is the most efficient way to write MATLAB code, is simple, neat, and very easy to debug.Indexing is explained quite well in the MATLAB introductory tutorials, which are highly recommended for all beginners:
Best Answer