You are on page 1of 16

:

:
-1-9 plot
:
)plot (x1,y1,c1s1,x2,y2,c2s2,x3,y3,c3s3,

sn :
. , o , x , + , - , * , -. , -- , penta , hexa
cn :

y,m,c,r,g,b,w,k

:
-1-9 plot
:
;)>> x= linspace(0,2*pi , 30); y= sin(x
;)>> plot(x,y
1

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1

:
-2-9
subplot .
:
)subplot( m ,n , p
m n p .
p . .
p 1 m*n .

:
-2-9 -
:
;)>> x=linspace(0,2*pi,30
;))>> subplot(2,2,1);plot(x,sin(x
;))>> subplot(2,2,2);plot(x,cos(x
;))>> subplot(2,2,3);plot(x,tan(x
;))>> subplot(2,2,4);plot(x,sin(x)+cos(x

:
-2-9 -
-:-

0.5

0.5

-0.5

-0.5

-1

1.5

-1

20

1
10
0.5
0

0
-0.5

-10
-1
-1.5

-20

:
-3-9
xlabel, ylabel , title
.
;) (>> xlabel
;) (>> ylabel
;) (>> title
plot
.

:
-4-9
( ) grid
. grid :
>> grid on
>> grid off
>> grid

:
-5-9
.

figure
;>> figure

.

:
-6-9
text gtext :
) >> text(x,y,
) (>> gtext
.

:
legend : -7-9
:
x=linspace(0,2*pi,30);
y=sin(x);
z=cos(x);
plot(x,y,g-.,b-);
legend(sin(x),cos(x));
title(Sin(x) and Cos(x) curves);
-

:
-8-9 : legend
-:

Sin(x) and Cos(x) curves


1

0.8

0.6

)sin(x
)cos(x

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1

:
-9-9 axis
:
)]axis([xmin,xmax,ymin,ymax,zmin,zmax
xmin ymin xmax ymax ... .
-------------axis off

axis on

:
-10-9 : hold

hold :

hold on
hold off
hold

:
-11-9
clf:
cla:
zoom:

ginput:

:
-12-9
plot :
polar:
() fill:
semilogx, semilogy, loglog:

stairs:
hist:
bar:

You might also like