First and second derivative of the function using fft?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi
Could anybody help me with derivative of function with fft, ifft, fftshift
Thanks!
0 comentarios
Respuesta aceptada
David Young
el 7 de Dic. de 2011
5 comentarios
David Young
el 7 de Dic. de 2011
Yes, you can do that. But you don't need the bsxfun if you're working in 1-D - you just multiply. In addition, you can do both multiplications before transforming back. So something like this:
F = fft(f);
FD = F .* ftdiff;
FDD = FD .* ftdiff;
fd = ifft(FD);
fdd = ifft(FDD);
where uppercase variables are in the frequency domain, and d or D means differentiated.
Más respuestas (1)
Dr. Seis
el 7 de Dic. de 2011
In that case I am converting acceleration data to displacement, which is (double) integration in the time domain and division in the frequency domain. In the frequency domain, this is essentially done by dividing the complex acceleration amplitude at frequency 'f' by (sqrt(-1)*2*pi*f)^2.
To go from displacement to velocity, you would multiply the displacement amplitude at frequency 'f' by sqrt(-1)*2*pi*f
To go from displacement to acceleration you would multiply the displacement amplitude at frequency 'f' by (sqrt(-1)*2*pi*f)^2
This is what David was referring to when he says the second derivative is "simply a matter of multiplying again."
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!