简体   繁体   English

octave fft的窦功能

[英]octave fft of sinus function

I need to use FFT function on sinus. 我需要在窦上使用FFT函数。

this is my sinus function: 这是我的窦功能:

octave:1> t=(0:1/16000:1);
octave:2> A=2;
octave:3> x=A*sin(2*pi*80*t);

this is how I try to make fft: 这就是我尝试制作fft的方法:

octave:60> l=length(x);
octave:61> k=fft(x,l);

It makes me triangle lol.. how can I do this properly? 这让我三角大声笑......我怎么能这样做呢?

@edit screen, is it good looking fft of sin? @edit屏幕,是不是很好看? can I improve it somehow? 能以某种方式改善它吗? 在此输入图像描述

@edit2 Can I improve it, so it would look better? @ edit2我可以改进它,所以看起来会更好吗?

Everything looks good from the screen shot. 从屏幕截图看,一切都很好看。

  1. The magnitude of the FFT of a sine function is two spike like objects. 正弦函数的FFT的幅度是两个像对象一样的尖峰。 What you are showing is correct. 你所展示的是正确的。

  2. The FFT is an algorithm that produces a result similar to the continuous Fourier transform, but is different in a few ways. FFT是一种算法,它产生类似于连续傅里叶变换的结果,但在某些方面有所不同。 Besides being discrete, Matlab's FFT warps the values. 除了是离散的,Matlab的FFT也会扭曲这些值。 This can be undone with fftshift(k) . 这可以通过fftshift(k)撤消。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM