Matlab Class Home
Class Outline
Previous Class
Next Class
Evaluation 3
Goal for Week 3: Making graphical representations of lists of numbers
Summary of new tools and commands.
plot(x,y)
Plot a line defined by lists x and y.
title('string')
Put a character string over the top center of the plot.
xlabel('string')
Put a character string at the bottom center.
ylabel('string')
Put a character string at the left.
xlim, ylim
Constrain the range of values on the x and y axes.
loglog(x,y)
Plot a line defined by the common log of x and the log of y.
semilogx(x,y),semilogy(x,y)
Plot a line defined by the y vs common log of x or common log of y vs x .
hold on, hold off
Freeze (and unfreeze) the plot scale to add more lines to a plot.
plotyy
plot two separate lines with different scales.
text(x,y,'c')
Put a character string on the plot in the indicated place (based on user units).
print
Save a plot to a file or sends it to the printer.
subplot
create an array of plots on a page.
figure
open a new graphics window for a plot.
...
continue command on the next line.
Tasks for Week 3
Tasks
1
Create a simple, annotated line plot using lists of values (x,y).
2
Print or save the figure to a file.
3
Control the use of symbols, line styles and colors; control axis scales; use common log scaling.
4
Put several lines on a graph.
5
Put several graphs on a page.
6
Organizing programming steps
Matlab Class Home
Class Outline
Previous Class
Next Class
Evaluation 3
email: J. Klinck