英语翻译t = 0:.001:.25;x = sin(2*pi*50*t) + sin(2*pi*120*t);y =
来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/27 20:16:31
英语翻译
t = 0:.001:.25;
x = sin(2*pi*50*t) + sin(2*pi*120*t);
y = x + 2*randn(size(t));
plot(y(1:50))
title('Noisy time domain signal')
Y = fft(y,256);
Pyy = Y.*conj(Y)/256;
f = 1000/256*(0:127);
plot(f,Pyy(1:128))
title('Power spectral density')
xlabel('Frequency (Hz)')
t = 0:.001:.25;
x = sin(2*pi*50*t) + sin(2*pi*120*t);
y = x + 2*randn(size(t));
plot(y(1:50))
title('Noisy time domain signal')
Y = fft(y,256);
Pyy = Y.*conj(Y)/256;
f = 1000/256*(0:127);
plot(f,Pyy(1:128))
title('Power spectral density')
xlabel('Frequency (Hz)')
t = 0:.001:.25;%%%产生时间序列t,隐含采样率f=1/0.001=1000Hz
x = sin(2*pi*50*t) + sin(2*pi*120*t);%%产生时域信号,有50Hz和120Hz两个频率
y = x + 2*randn(size(t));%%给x加噪声,randn的用法不用说了吧
plot(y(1:50))%%作图
title('Noisy time domain signal')
Y = fft(y,256);%%%对时域加噪信号做256点傅里叶变换
Pyy = Y.*conj(Y)/256;%%求个频率点处幅值
f = 1000/256*(0:127);%%频率轴
plot(f,Pyy(1:128))
title('Power spectral density')
xlabel('Frequency (Hz)')
你的频率分辨率df=1000/256=3.9Hz,不合适,无法分辨出50Hz和120Hz,望注意.
希望对你有所帮助,有问题欢迎追问,满意请采纳.
给你一个参考程序:
Fs=50;%%采样频率
N=100;%%采样点数
dt=1/Fs;%%时域最小间隔,即时域分辨率
t=(0:N-1)*dt;%%采样时间长度
df=Fs/N;%%频域最小间隔,即频域分辨率
f=(-N/2:N/2-1)*df;
x=sin(2*pi*15*t)+2*sin(2*pi*18*t);
y=fft(x);
Y=fftshift(y);
A=abs(Y);
A=A/(N/2);%%还原真实幅值
figure(1)
subplot(121)
plot(t,x)
xlabel('时间t')
ylabel('幅值x')
grid on
subplot(122)
plot(f,A)
xlabel('频率f')
ylabel('幅值A')
grid on
x = sin(2*pi*50*t) + sin(2*pi*120*t);%%产生时域信号,有50Hz和120Hz两个频率
y = x + 2*randn(size(t));%%给x加噪声,randn的用法不用说了吧
plot(y(1:50))%%作图
title('Noisy time domain signal')
Y = fft(y,256);%%%对时域加噪信号做256点傅里叶变换
Pyy = Y.*conj(Y)/256;%%求个频率点处幅值
f = 1000/256*(0:127);%%频率轴
plot(f,Pyy(1:128))
title('Power spectral density')
xlabel('Frequency (Hz)')
你的频率分辨率df=1000/256=3.9Hz,不合适,无法分辨出50Hz和120Hz,望注意.
希望对你有所帮助,有问题欢迎追问,满意请采纳.
给你一个参考程序:
Fs=50;%%采样频率
N=100;%%采样点数
dt=1/Fs;%%时域最小间隔,即时域分辨率
t=(0:N-1)*dt;%%采样时间长度
df=Fs/N;%%频域最小间隔,即频域分辨率
f=(-N/2:N/2-1)*df;
x=sin(2*pi*15*t)+2*sin(2*pi*18*t);
y=fft(x);
Y=fftshift(y);
A=abs(Y);
A=A/(N/2);%%还原真实幅值
figure(1)
subplot(121)
plot(t,x)
xlabel('时间t')
ylabel('幅值x')
grid on
subplot(122)
plot(f,A)
xlabel('频率f')
ylabel('幅值A')
grid on
英语翻译t = 0:.001:.25;x = sin(2*pi*50*t) + sin(2*pi*120*t);y =
t=0:pi/100:10*pi; x=2*(cos(t)+t*sin(t)); y=2*(sin(t)-t*cos(t
matlab中t=linspace(0,2*pi,100);x=[t;t]';y=[sin(t);cos(t)]';pl
Matlab u(x,t)=sin(5*pi*x)cos(5*pi*t)+2sin(7*pi*x)cos(7*pi*t)
matlab中问题:x = A1 * sin(2 * pi * f1 * t) + A2 * sin(2 * pi *
matlab绘图中的语法t=0:0.1:2*pi;y=sin(t);plot(t,
x=4*sin(2*pi*0.01*t).*sin(2*pi*3*t)+2*cos(pi*t*t/4);在matlab中
matlab中假设t=0:0.1:2*pi;为什么y=t.*sin(t).*sin(t)不等于y=t.*(sin(t))
出处 h=2*pi/100;t=0:h:2*pi;r=0:0.05:1;x=r'*cos(t);y=r'*sin(t);
matlab 对信号y = sin(pi*50*t)+3*cos(2*pi*100*t);什么意思
在matlab中sin(t).和sin(t)有什么区别 例如:t=0:pi/20:2*pi y1=sin(t).*sin
clear all;t=0:0.1:50;yp=sin(2*pi*2*t);yq=sin(2*pi*2.0125*t);