
Using Cells for Rapid Code Iterati on a nd P ub lishi ng Results
Example — Define Cells
This example defines two cells for a simple M- file called sine_wave,shownin
the following code and figure. The first cell creates the basic res ults, while the
second label the plot. The two cells in this example allow you to experiment
with the plot of the data first, and then w hen that is final, change the plot
properties to affect the style of presentation.
% Define the range for x.
% Calculate and plot y = sin(x).
x = 0:1:6*pi;
y = sin(x);
plot(x,y)
title('Sine Wave','FontWeight','bold')
xlabel('x')
ylabel('sin(x)')
set(gca,'Color','w')
set(gcf, 'MenuBar', 'none')
1 Select Cell
>EnableCellMode, if it is not already enabled.
6-137
Comentários a estes Manuais