Matlab绘图示例

Matlab绘图示例,第1张

Matlab绘图示例

matlab下绘图的简单示例

示例一(用plot同时绘制两条曲线)

x=0:0.01:2*pi
plot(x,sin(x),'green')
hold on
plot(x,sin(2*x),'red')

示例二(用stem绘制多个序列)

n=0:50; 
A=444.128;
a=50*sqrt(2.0)*pi;
T=0.001; 
w0=50*sqrt(2.0)*pi;
x=444.128*exp(-a*n*T).*sin(w0*n*T); 
X=fft(x);
% Draw x,abs(X),angle(X)
hold on
stem(x)
stem(abs(X),'fill','r-.')
stem(angle(X),'fill','g-.')

示例三(从复平面看幅频特性)

th = (0:127)/128*2*pi;
x = cos(th);
y = sin(th);
f = abs(fft(ones(10,1),128));
stem3(x,y,f','d','fill')
view([-65 30])
xlabel('Real')
ylabel('Imaginary')
zlabel('Amplitude')
TItle('Magnitude Frequency Response')
rotate3d on
200多个MATLAB经典教程和MATLAB论文请查看matlab教程

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/dianzi/2421016.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-08-01
下一篇 2022-08-01

发表评论

登录后才能评论

评论列表(0条)

保存