- Break long MATLAB statements by using the … command. See this link for examples and the nature of the command
- Break long comments simply by putting them on separate lines
% My name is Autar, my age is 20, my major is Mechanical Engg
can be written as
% My name is Autar
% my age is 20
% my major is Mechanical Engg
- If you want to print a long string without running off the page along its width, break the string and then concatenate the resulting strings vertically. http://www.mathworks.com/help/matlab/ref/strvcat.html Then use the disp statement to print the string to the command window or in published format.