Example 02
plot(x,y,x,z)
GIVEN: Two sets of data (x,y) and (x,z)
REQUIRED: Plot the data.
SOLUTION:Generate example02.m file:
File
New
Example02.m
Enter your data as follows:
x=[0 1 2 3 4 5];
y=[6 7 8 9 10 11];
z=[12 14 16 18 20 22];
plot(x,y,x,z)
Note:
You may save the figure as a postscript file:
print example02.ps
Example
Homework:
a. Add symbols
b. Add a legend
Please send questions or suggestions about this web page to beatnic@aset.psu.edu
ASET | ITS | Penn State
|