MATLAB: How to add semi-colons to lines of MATLAB code automatically in MATLAB 7.10 (R2010a)

MATLAB

I want to add semi-colons to lines of MATLAB code automatically.

Best Answer

There is no direct, built-in way to globally control the placement of semi-colons in MATLAB files. You will have to write custom scripts to do that.
See attached function called fixSemiColon() which calls readLineOfFile() and replaceFileLine() and shows a way of doing this.