📄 demod_iqii.m
字号:
function [BI, BQ] = demod_iqII (y)
%%%%%%%%%%%%%%%%%%%%%%%
%% Extract the I,Q components utilising Poly-phase Filter digitally quadrature.
global k Fc Fd Fs n;
N = length(y);
%BI = y(0:2:N-1);
%BQ = y(1:2:N);
for i = 1 : N/2
BI(i) = y(2*i-1 ) * (-1)^(i-1);
BQ(i) = y(2*i) * (-1)^(i-1);
end
Num_I = [ 0.000000, -3.0689215e-4, -1.1993570e-2, 4.8911806e-2, 0.1767598, 4.8911806e-2, -1.1993570e-2, -3.0689215e-4 ];
Num_Q = [ 8.3456202e-5, -4.2909505e-3, -4.1642617e-3, 0.1333630, 0.1333630, -4.1642617e-3, -4.2909505e-3, 8.3456202e-5 ];
Den = [1];
BI = filter(Num_Q, Den ,BI) *4;
BQ = filter(Num_I, Den ,BQ) *4;
%Analize Spectrum
%figure (202);
%analysis_spec (BI, BI, n(1:2:N), Fs);
%title ('Waveform of Quadrature Component I');
%figure (203);
%analysis_spec (BQ, BQ, n(1:2:N), Fs);
%title ('Waveform of Quadrature Component Q');
%figure (202);
%analysis_spec (BQ, BI, n(1:2:N), Fs);
%title ('Waveform of Quadrature Component Q I');
%下面是屏蔽原来的画图程序
%%for i = 1:1 % set 1:0 to cancel the plot function.
%%figure (202);
%%subplot (2,1,1);
%%stairs ((1:N/2), BI);
%%title ('Waveform of Quadrature Component I');
%%subplot (2,1,2);
%%stairs ((1:N/2), BQ);
%%title ('Waveform of Quadrature Component Q');
%%end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -