How do I plot this simple function in matlab
显示 更早的评论
I have a function f(x) = +i x>0;
= 1 x=0;
= -i x<0 ;
I am confused because of the existence of the complex number. Suppose I want to take the fourier transform of this function. I do y=fft(f(x)); plot(x,real(y)); Is this right?
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2012-11-2
编辑:Azzi Abdelmalek
2012-11-2
x=rand(100,1) % eg
y=fft(x)
plot(abs(y))
why real(y)?
类别
在 帮助中心 和 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!