Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我用fft在matlab中创建了一个音频回波信号:它是真的“回波”吗_Matlab_Audio_Fft - Fatal编程技术网

我用fft在matlab中创建了一个音频回波信号:它是真的“回波”吗

我用fft在matlab中创建了一个音频回波信号:它是真的“回波”吗,matlab,audio,fft,Matlab,Audio,Fft,这只是我假设所有维度都符合的一个概要: (code that imports audio to read audio as function x) X=fft(x); (code to define time t and frequency f) H=L+M*exp(-1i*2*pi*f*N)+O*exp(-1i*2*pi*f*P); % This is where it gets tricky % In the frequency domai

这只是我假设所有维度都符合的一个概要:

    (code that imports audio to read audio as function x)
    X=fft(x);
    (code to define time t and frequency f)

    H=L+M*exp(-1i*2*pi*f*N)+O*exp(-1i*2*pi*f*P);
    % This is where it gets tricky 
    % In the frequency domain I have the function above where f is the frequency 
    % variable and L M N O P are arbitrary values

    Y=X.*H;   
    % again assume dimensions fit

    y=real(ifftshift(ifft(Y)*length(t)));
    %Taking the inverse fft and fftshift was the only way I could get back a signal
    % Once again assume the dimensions fit 
我会发布照片,但我至少需要10个代表: 我将尽我所能在以下方面进行描述:

   | 
   ||       
   |||||  
   ||     
   |
这是我的原始输入信号x

      |      |
    |||      |||
      |      |
这是我的输出y

现在,如果我将输出y重设为det-t0,并将其添加到原始值中,我将得到以下结果

   | 
   ||        |
   |||||     |||
   ||        | 
   |

这合法吗?还是我只是在开玩笑?

从根本上说,您使用正确的工具来创建回声,因此您得到的是合理的。考虑回波可以被描述,输入信号与δ函数的卷积。< /P> $$Yt=Xt\ast\deltat-t{echo}$$

在频域中,卷积表示为乘法。此外,delta函数成为wave$e^{i2\pit{echo}f}$。请参阅有关傅立叶变换的wiki。你的H函数基本上是这些波中的三个,对应于delta,常数是$e^{i2\pi0f}$。。当你把X乘以H,你就是在复制和翻译X。所以,在时域中,你应该得到与O,M,L成比例的信号的三个副本


一旦您了解了这些一般概念,那么您需要关注实现的细节。请密切注意如何定义频率,以确保它与FFT生成的点匹配。如果您不确定自己的实现,那么最好的测试方法是以增量方式构建它。设置H=1,此时输出应与输入匹配。然后只尝试一个波,确认你得到的是你期望的准确回声。一般来说,通过使用更简单的输入信号(纯cos)或带有包络的cos,可以更容易地进行测试和检查。

我已经找到了解决方案。我在dsp部分发布了这个答案和解决方案。我只是花时间阅读了你所说的,我同意你的观点。我应该在dsp部分提问,因为我已经知道与傅立叶分析相关的数学知识。这是你的电话号码