⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmp613.m

📁 信号分析与处理的一些源代码
💻 M
字号:
%MATLAB PROGRAM 6-13
%Transfer Function Estimate
%Create input signal
N=1024;
Nfft=256;
window=hanning(256);
noverlap=128;
dflag='none';
Fs=1000;
n=0:N-1;
t=n/Fs;
randn('state',0)
xn=sin(2*pi*50*t)+randn(1,N);
%Create a system: filter
h=ones(1,10)/10;
%Compute output signal
yn=filter(h,1,xn);
%Estimate Transfer Function by 'etf'
[HEST,f]=tfe(xn,yn,Nfft,Fs,window,noverlap,dflag);
%Compute frequency response by 'freqz'
H=freqz(h,1,f,Fs);
%Compare the results
subplot(211)
plot(f,abs(H));
xlabel('Frequency (Hz)');
ylabel('Magnitude');
title('Frequency Response')
axis([0 500 0 1]);
grid

subplot(212)
plot(f,abs(HEST));
xlabel('Frequency (Hz)');
ylabel('Magnitude');
title('Transfer Function Estimate');
axis([0 500 0 1])
grid

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -