MATLAB: Question regerding the print

bisectionMATLAB

".mlx" files only execute and give output in the live script area
but ".m" files out put in command window but it does the calculation in command window
can you help me with that , can you explain how it works

Best Answer

Don't really understand the question/confusion...
Live Scripts or Live Functions are just that -- they exist and can run only in the Live Editor environment which is another entirely separate environment than the traditional code editor and command window. It is essentially a fancy command window but in order to have that facility it also doesn't support all the bells and whistles of MATLAB m-file functions.
See the documentation at What is live script or function for more information on just what the differences are and what TMW thinks the purpose behind live scripts is.
I've never used or even opened the Live Editor...serve no purpose for my usage of MATLAB but for students and other things I could see where could be handy/useful for documentation.