4.1 THE plot COMMAND
plot(x,y,‘line specifiers’,‘PropertyName’,PropertyValue)
x,y分别是大小相等的Vector
Line Specifiers
solid (default) -
dotted :
dashed --
dash-dot -.
The line color specifiers
red r
green g
blue b
The marker type specifiers
plus sign +
circle o
asterisk *
例子
plot(x,y,‘g:d’)
plot(x,y,‘--y’)
Property Name and Property Value:
LineWidth
MarkerSize
MarkerEdgeColor
MarkerFaceColor
例子
plot(x,y,‘-mo’,‘LineWidth’,2,‘markersize’,12,‘MarkerEdgeColor’,‘g’,‘markerfacecolor’,‘y’)
4.2 THE fplot COMMAND
fplot(‘function’,limits,‘line specifiers’)
fplot('x^2+4*sin(2*x)-1',[-3 3])
line specifiers和plot一样的
4.3 PLOTTING MULTIPLE GRAPHS IN THE SAME PLOT
1.Using the plot Command
plot(x,y,u,v,t,h)
plot(x,y,‘-b’,u,v,‘--r’,t,h,‘g:’)
2.Using the hold on and hold off Commands
x=[-2:0.01:4];
y=3*x.^3-26*x+6;
yd=9*x.^2-26;
ydd=18*x;
plot(x,y,'-b')
hold on
plot(x,yd,'--r')
plot(x,ydd,':k')
hold off
3.Using the line Command
line(x,y,‘PropertyName’,PropertyValue)
line(x,y,‘linestyle’,‘--’,‘color’,‘r’,‘marker’,‘o’)
x=[-2:0.01:4];
y=3*x.^3-26*x+6;
yd=9*x.^2-26;
ydd=18*x;
plot(x,y,'LineStyle','-','color','b')
//画好图之后加上去的
line(x,yd,'LineStyle','--','color','r')
line(x,ydd,'linestyle',':','color','k')
4.FORMATTING A PLOT
The xlabel and ylabel commands
xlabel(‘text as string’)
ylabel(‘text as string’)
The title command
title(‘text as string’)
The text command:
text(x,y,‘text as string’)
gtext(‘text as string’)
The legend command
legend(‘string1’,‘string2’, ..... ,pos)
Formatting the text within the xlabel, ylabel, title, text and legend commands
\bf bold font
\fontname{fontname} specified font is used
\it italic style
\fontsize{fontsize} specified font size is used
\rm normal font
text(x,y,‘text as string’,PropertyName,PropertyValue)
The axis command:
axis([xmin,xmax,ymin,ymax])
//Sets the limits of both the x and y axes (xmin, xmax, ymin, and ymax are numbers).
例子
x=[10:0.1:22];
y=95000./x.^2;
xd=[10:2:22];
yd=[950 640 460 340 250 180 140];
plot(x,y,'-','LineWidth',1.0)
xlabel('DISTANCE (cm)')
ylabel('INTENSITY (lux)')
title('\fontname{Arial}Light Intensity as a Function of Distance','FontSize',14)
axis([8 24 0 1200])
text(14,700,'Comparison between theory and experiment.','EdgeColor','r','LineWidth',2)
hold on
plot(xd,yd,'ro--','linewidth',1.0,'markersize',10)
legend('Theory','Experiment',0)
hold off
分享到:
相关推荐
Two-dimensional phase unwrapping: theory, algorithms, and software Phase unwrapping is a mathematical problem-solving technique increasingly used in synthetic aperture radar (SAR) interferometry, ...
A Two-Dimensional Bar Code Reader.pdf
二维码的MATLAB仿真程序,能够很好地帮助大家
二维快速傅立叶变换 信号处理中的应用Two-dimensional fast Fourier transform - Signal Processing
Two-Dimensional Phase Unwrapping Problem,By Dr. Munther Gdeisat and Dr. Francis Lilley 二维相位展开相关内容,主要是误差分析,内含matlab代码实现
论文“A Fast Two-Dimensional Median Filtering Algorithm”
MUSIC and maximum likelihood techniques on two-dimensional DOA estimation with uniform circular array
Two-dimensional Phase Unwrapping: Theory, Algorithms, and Software一书的源代码
2D FFT并行解法。
本实验要求开发一个2-D FFT程序包,使其可以应用于后续的几个实验。这个程序需要完成的功能是用因子(-1)^(x+y)乘以输入图像以实现滤波的中心变换,并还要求用一个实矩阵乘以一个复数矩阵通过调用两个图像的乘法...
Editorial Reviews Product Description New to P-H Signal Processing Series (Alan Oppenheim, Series Ed) this text covers the principles and applications of "multidimensional" and "image" digital signal ...
Editorial Reviews Product Description New to P-H Signal Processing Series (Alan Oppenheim, Series Ed) this text covers the principles and applications of "multidimensional" and "image" digital signal ...
C语言-二维数组two-dimensional-array-master.zip
基于横向多剪切量的二维波前重建,郭云峰,陈浩,本文提出了一种测量二维物体相位的多剪切量干涉计量方法,该方法可以有效地消除单剪切干涉中出现的频谱泄漏的问题。二维相位可以
为什么在高维空间学习具有挑战性,这是有根本原因的(“维度诅咒”)。跨越信号处理、统计和优化的一个基本挑战是在高维数据集中利用低维结构。低维信号建模推动了理论和应用领域的发展,从医学和科学成像,到低功耗...
Two-dimensional signal and image processing by JAE S. LIM PRENTICE HALL PTR, Upper Saddle River, New Jersey 07458 page 694
Image classification by a Two Dimensional Hidden Markov Model
Two-Dimensional Modeling of Volatile Organic Compounds Adsorption onto Beaded Activated Carbon
Two-Dimensional Model for Pore Pressure Accumulations in the Vicinity of a Buried Pipeline
A simple program that shows how a two-dimensional array works within a VB program.