How to submit your work in MATLAB
This page includes instructions for how to publish your MATLAB work so that it may clearly be read. So follow these steps before submitting your homework in MATLAB.
Inside the file Homework_1.m, type in the MATLAB code as usual
for i = 1:10 a(i) = i^2; end
This will create an html document including your code in a nicely formatted boxes.
disp('Or, click the icon to the right of the print icon');
disp('Commenting your code well helps everyone.');
This line was created by putting a single % sign in front. This is handy when you need to write a lot of English to explain your work.
% Sample code [min_a, ix] = min(a);
These two commands can also be used for publish.
% This command creates the html file publish('Homework_1.m'); % This command views the html page web('html/Homework_1.html');
This is what the professionals say.