Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - linspace
Search - linspace - List
例4:在sinc(t)信号中叠加噪声,分析对应频谱 fs=100 采样频率,必须大于两倍基带信号最高频率 ts=1/fs 采样时间间隔 T=2 时间窗大小 - x=x+0.1*randn(1,N) x=awgn(x,-10, measured ) figure plot(t,x) title( 时域信号图 ) xlabel( t /s ) y=fft(x,N) figure if mod(N,2)~=0 N=N-1 end f=linspace(0,fs/2,N/2) plot(f,abs(y(1:N/2))*2/N) title( 叠加噪声的sinc(t)信号频谱 ) xlabel( f /Hz ) figure y0=y(1:N/2) P=y0.*conj(y0)/N P=10*log10(P) plot(f,P) title( 功率谱 ) xlabel( f /Hz )
Date : 2025-12-28 Size : 1kb User : 张红

例3:分析占空比为ta的矩形脉冲频谱 T=1 时间窗大小 ta=0.5 占空比 N=256 t=linspace(-T,T,N) ts=2*T/N fs=1/ts -x=zeros(1,N) x(N/2-round(N/2*ta):N/2+round(N/2*ta))=ones(1,2*round(N/2*ta)+1) y=fft(x,N) figure plot(t,x) title([ 时域信号图 占空比为 ,num2str(ta)]) axis([-T T-0.2 1.2]) xlabel( t /s ) figure subplot(211) f=linspace(-fs/2,fs/2,N) plot(f,abs(fftshift(y))/N) title([ 矩形脉冲双边谱 脉冲时间t=[- ,num2str(ta*T), , ,num2str(ta*T), ] ]) xlabel( f /Hz )
Date : 2025-12-28 Size : 1kb User : 张红
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.