How do I plot this simple function in matlab
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 2 de Nov. de 2012
Editada: Azzi Abdelmalek
el 2 de Nov. de 2012
x=rand(100,1) % eg
y=fft(x)
plot(abs(y))
why real(y)?
Categorías
Más información sobre Fourier Analysis and Filtering en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!