MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   【求助】大侠,来帮下忙~ (https://www.labfans.com/bbs/showthread.php?t=970)

Orient8503 2007-12-14 15:51

【求助】怎么把下面那段代码在图像中横坐标以信噪比的形式显示
 
怎么把下面那段代码在图像中横坐标以信噪比的形式显示
怎么把下面一段代码在图中横坐标以信躁比形式来显示,
clear;
f1=50;
f2=120;
fs=1000;
t1=0:1/fs:(1.024-1/fs);
x1=sin(2*pi*f1*t1)+sin(2*pi*f2*t1);
x2=x1+randn(size(x1));
y1=abs(fft(x2,1024));
ff1=(0:511)*10/1024;
figure;
subplot(2,1,1)
plot(t1,x2);
subplot(2,1,2);
plot(ff1,y1(1:512));
axis([0 2 0 100]);


所有时间均为北京时间。现在的时间是 14:43

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.