Matlab常用的绘图程序Word格式文档下载.docx
《Matlab常用的绘图程序Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《Matlab常用的绘图程序Word格式文档下载.docx(10页珍藏版)》请在冰豆网上搜索。
holdon
plot(t,sin(t-pi/2),'
--mo'
plot(t,sin(t-pi),'
:
bs'
holdoff;
title('
sin(t),sin(t-pi/2),sin(t-pi)'
程序2
plot(t,sin(2*t),'
-mo'
...
'
LineWidth'
2,...
MarkerEdgeColor'
'
k'
MarkerFaceColor'
[.491.63],...
MarkerSize'
10)
程序3
loadclown
surface(peaks,flipud(X),...
FaceColor'
texturemap'
EdgeColor'
none'
CDataMapping'
direct'
colormap(map)
view(-35,45)
程序4
pcolor(hadamard(20))
colormap(gray
(2))
axisij
axissquare
程序5
n=6;
r=(0:
n)'
/n;
theta=pi*(-n:
n)/n;
X=r*cos(theta);
Y=r*sin(theta);
C=r*cos(2*theta);
pcolor(X,Y,C)
axisequaltight
程序6
loadmandrill
figure('
color'
image(X)
colormap(map)
axisoff%Removeaxisticksandnumbers
axisimage%Setaspectratiotoobtainsquarepixels
程序7
figure
ax
(1)=subplot(1,2,1);
rgb=imread('
ngc6543a.jpg'
);
image(rgb);
title('
RGBimage'
ax
(2)=subplot(1,2,2);
im=mean(rgb,3);
image(im);
IntensityHeatMap'
colormap(hot(256))
linkaxes(ax,'
xy'
程序8
loadflujet
colormap(jet)
程序9
loadspine
colormapbone
程序10
x=0:
y1=sin(x+1).*cos(x-1);
y2=sin(x+1).^2+cos(x-1);
y3=sin(2*x+1)+cos(x/2-1);
plot(t,y1,'
-.b*'
plot(t,y2,'
--ro'
plot(t,y3,'
gs'
holdoff