Figure Example
Demonstrates creating figures in MATLAB for publishing.
Contents
Sinc
Here we show how to create a plot and label the figure.
% Plot a sinc x = 0:0.2:4*pi; plot(x, sin(2*x)./x); title('sin(2x)/x');
Note that the published plot includes the title. MATLAB publishes the figure as it appears at the end of the cell.
Cos and Bessel
Here we show what happens when we create more than one figure in a cell.
% Plot a cos plot(x, cos(x)); title('cos(x)'); % Plot Bessel functions plot(x, besselj(0:4,x'));
Note that in the published version, only the figure that results from the second plot appears.