From: yomguy Date: Mon, 7 Apr 2008 08:38:30 +0000 (+0000) Subject: * Fixed -6db/oct for RI X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f14d65a75cde12d9d705c42d9d36e1bd0676cbb0;p=cnaq.git * Fixed -6db/oct for RI * Fixed date git-svn-id: http://svn.parisson.org/svn/CNAQ/trunk@168 5fc3e0e6-29bc-4d03-b52b-c088cb822bde --- diff --git a/CNAQ.m b/CNAQ.m index 52f30c0..c14dad1 100644 --- a/CNAQ.m +++ b/CNAQ.m @@ -1,7 +1,7 @@ function varargout = CNAQ(varargin) % CNAQ M-file for CNAQ.fig % -% Copyright (c) 2007 Guillaume Pellerin +% Copyright (c) 2007-2008 Guillaume Pellerin % All rights reserved. % This software is governed by the CeCILL license under French law and diff --git a/tools/RI_FT.m b/tools/RI_FT.m index 140f68d..33e81ab 100644 --- a/tools/RI_FT.m +++ b/tools/RI_FT.m @@ -10,7 +10,7 @@ f0 = f(1); f1 = f(len_f); % Methode du produit -siginv=fliplr(sig_exc)./f; +siginv=flipud(sig_exc)./f; ft=fft([sig_mes; zeros(len_f-1,1)]).*fft([siginv; zeros(len_f-1,1)]); ri=real(ifft(ft)); norm=sqrt(sum(abs(ri.^2))/len_f); diff --git a/tools/fonc_trans.m b/tools/fonc_trans.m index a58b683..fb186ac 100644 --- a/tools/fonc_trans.m +++ b/tools/fonc_trans.m @@ -6,22 +6,9 @@ function [ri,ft]=fonc_trans(f, sig_exc, sig_mes); DC = mean(sig_mes,1); sig_mes = sig_mes - DC; len_f = length(f); -f0 = f(1); -f1 = f(length(f)); - -% Methode du produit -%sig_exc_inv = sig_exc(len_f:-1:1)'.*f0./f'; -%X = fft([sig_mes; zeros(length(sig_exc_inv)-1, 1)]); -%Y = fft([sig_exc_inv; zeros(length(sig_mes)-1, 1)]); -%spec=X.*Y; -%rep_imp = ifft(spec); % Methode du quotient -%sig_exc = sig_exc(len_f:-1:1)'.*f0./f'; -X = fft(sig_exc); -Y = fft(sig_mes); +X = fft([sig_exc; zeros(len_f-1,1)]); +Y = fft([sig_mes; zeros(len_f-1,1)]); ft = Y./X; -ri = ifft(ft); - -% Methode par déconvolution -%[ft, r] = deconv(sig_mes, sig_exc); +ri = real(ifft(ft));