MATLAB Answers

FFT of a function

2 views (last 30 days)
ong on 11 Apr 2013
I would like to do a FFT of x, x=cos(2*pi*f*t)
How can i replace X(W) = FFT(X) --> X(W/a) = ?

Answers (1)

Mayowa Aregbesola (themaze)
Here is a nice way to accomplish that
I am assuming that w = 2*pi*f. Also you need to define your t
Xw = @(w, t) fft(cos(w*t));
to call the function, just use
Xw(w, t) or Xw(W/a, t)
  1 Comment
ong on 11 Apr 2013
Hi, thanks for the respond. What does the @ component do?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!