MATLAB: Is it possible to add line numbers to MATLAB Editor/Debugger

editorlineMATLABnumbersprinting

Can I add line numbers to MATLAB Editor/Debugger?

Best Answer

This issue has been addressed in MATLAB 6.0 (R12) and above. The line numbers are displayed on the left of each line, and it is possible to print your code with the line numbers as of MATLAB 6.1 (R12.1).
In MATLAB 7.9 (R2009b), to enable printing with line numbers, navigate to File -> Page Setup. Under the "layout" tab select "Print with line numbers".