Nomenclature For A Typical Xy Plot (Review)
Nomenclature For A Typical Xy Plot (Review)
Example
Solution
x=-1:0.01:1;
y=8*x.^3;
plot(x,y),set(gca,'xtick',-1:0.25:1,'ytick',-8:2:8)
xlabel('x'),ylabel('y')
Rectangular Plot
Logarithmic Plot
Logarithmic Plots
1. You cannot plot negative
numbers on a log scale,
because the logarithm of a
negative number is not
defined.
2. You cannot plot the number 0
on a log scale, because log10
0 = ln 0 = . You must
choose an appropriate small
number (e.g. 0.01) as the
lower limit on the plot.
0.1
100
2 x101
3 x101
4 x101
y = 15 x 0.37
y = 25e0.5 x
120
110
100
90
y1
80
70
60
50
40
30
20
0.5
1.5
x1
2.5
Exercise
Create the following plot:
>> t=1:0.1:100;
>>y=sin(t);
>>plot(t,y)
Use the Plot View tools to:
a) Add labels to the axes
b) Change the color and thickness of the plot
c) Generate and save the m-file for the modified plot
Exercise (Cont.)
1. Click on the
axes to activate
the window for
labeling
2. Click on the
tabs to
add/change the
axes labels
4. Click on the
available options
to change
color/thickness