derive with fft and ifft
1 次查看(过去 30 天)
显示 更早的评论
clear all
clc
z=50;
x=linspace(0,2*pi,z);
a=cos(x);
% derive while using ifft
k=1./x;
tf_a=1i.*k.*fft(a);
da=ifft(tf_a);
plot(x,a,'r',x,da,'b',x,gradient(a)./gradient(x))
legend('cos(x)','ifft(ik(fft(cos(x))))','gradient');
% when I run the program, the amplitude of "da" is different from the amplitude of " gradient(a). /gradient(x)" and it depends on z.
how can I fix this in a way "da "=" gradient(a). /gradient(x)"
thank you in advance
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!