May 2006
Intermediate to advanced
763 pages
16h 57m
English
%===== CECHAN2.M
Ds=.1; % Signal length
F0=200; % Frequency of the sine function
Fs=input('Sampling frequency in Hz (F0=200 Hz) = ');
Ts=1/Fs; Ne=Ds/Ts+1; % Number of samples
K=40; % Interpolation fonction for displaying
Tc=Ts/K; Nc=Ds/Tc+1; % Nb points of the "continuous" signal
%=================
tpc=[0:Nc-1]*Tc; xtc=cos(2*pi*tpc*F0); % "Continuous" signal
tpe=[0:Ne-1]*Ts; xte=cos(2*pi*tpe*F0); % Samples
subplot(211); plot(tpc,xtc,'-',tpe,xte,'o');
%===== Interpolation function
ht=sin(pi*Fs*tpc) ./ tpc /Fs / pi; ht(1)=1;
Ni=200; % Reconstruction filter hti=[ht(Ni:-1:2) ht(1:Ni)]; % (length 2*Ni-1) ...Read now
Unlock full access