MATLAB-function that calculates discrete Fourier transform
2 ビュー (過去 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
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
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
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,
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!