MATLAB-function that calculates discrete Fourier transform

조회 수: 1 (최근 30일)
Tom
Tom 2013년 3월 29일
댓글: Image Analyst 2015년 3월 30일
Hello,
I have to write a MATLAB-function that calculates the discrete Fourier transform and the inverse Fourier transform of a vector.
The input consists of a vector of length 2^N, where N is a natural number, so the length of the vector is a power of 2. I am not allowed to use functions like fft and ifft.
I have no idea how to start.
Thanks in advance!
  댓글 수: 2
John D'Errico
John D'Errico 2015년 3월 30일
Well, if you have absolutely no idea, then you are probably in the wrong class. Did you take notes in class? Do you have a text for the class? Lacking all of that, you might just use Google. It is your friend. "fft formula" might be a place to start. I'll bet there is a formula for this, IF you looked in those places. It need not be superbly efficient. Make an effort. Unless of course, you just forgot to show up the first few months for class.
You start by creating a function in the MATLAB editor. Then looking at the formula that you found, you type it in.
Image Analyst
Image Analyst 2015년 3월 30일
Do you have to write the fft function yourself (basically creating your own version of the built-in fft() function), OR can you write a function that calls the built-in fft() function, and then perhaps does some other stuff, like asking for an input data file, or plotting, or whatever? Which is it?

댓글을 달려면 로그인하십시오.

답변 (1개)

Mahdiyar
Mahdiyar 2015년 3월 30일
Hi Tom
The best way to write any matlab code is that:
First, you have to know what you want to do, in technical point of view. For example, in this case you have to perfectly know how to calculate the discrete FFt.
Second, you have to make a flowchart or write a pseudo code.
Finally you may write each step very easily.
regards,

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by