Skip to content
Extraits de code Groupes Projets
Valider df3ff8a6 rédigé par Renaud Gonce's avatar Renaud Gonce
Parcourir les fichiers

Add new file

parent 5c088407
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
function [h] = LPF(type, fcut, reso, Nper)
Tb = 1e-06;
M = reso*Nper;
Ham = 0.54 - 0.46*cos( (2*pi*(0:M))/M );
Black = 0.42 - 0.5*cos( (2*pi*(0:M))/M ) + 0.08*cos( (4*pi*(0:M))/M );
sinc_trunc = sin((fcut*2*pi*((0:M)/(M/Nper)-Nper/2)*Tb)) ./ (fcut*2*pi*((0:M)/(M/Nper)-Nper/2)*Tb);
sinc_trunc(isnan(sinc_trunc)) = 1;
if (strcmp(type,'Hamming'))
h = Ham.*sinc_trunc;
elseif (strcmp(type, 'Blackman'))
h = Black.*sinc_trunc;
else
fprintf('Error: this window type is not implemented!');
end
end
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter