ir_tf.m
来自「OFDM multipath fading channel model jake」· M 代码 · 共 24 行
M
24 行
% IR_TF.m
% Draw Impulse Response and Transfer Function
function []=IR_TF(r, name)
%****************************** variables ******************************
% r Envelope of fading channel complex impulse response
% name Title of the diagram
%************************************************************************
% Impulse Response
IR = 20*log10(r);
figure;clf;stem(0:length(IR)-1,IR-max(IR));grid on
title(['Impluse Response', name]);
xlabel('Time Delay');
ylabel('Impuse Response(dB)');
% Transfer Function
TF = fft(r);
%TF = 10.*log10(TF.*conj(TF));
TF = 20.*log10(abs(TF));
figure;clf;plot(0:1/(length(TF)-1):1,TF);grid on
title(['Transfer Function', name]);
xlabel('Frequency(rad)');
ylabel('Transfer Function(dB)');
%***************************** end of file *******************************
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?