简体   繁体   English

使用Matlab更改信号的频率

[英]Changing the frequency of a signal using Matlab

I want to change the frequency of a given oscillatory signal y(t) using Matlab. 我想使用Matlab更改给定振荡信号y(t)的频率。


Let's consider a sine signal as an example: 让我们以正弦信号为例:

h = 0.01;         %step width
t = 0:h:2*pi;
y = sin(2*pi*t);

This generates a sine signal with a frequency of 1 Hz , assuming t is measured in seconds. 假设t以秒为单位测量,这将生成频率为1 Hz的正弦信号。

Is it possible to change the frequency of the signal y(t) to an arbitrary frequency of x Hz without using y = sin(2*pi*x*t) (as the actual signal I want to change the frequency of isn't given analytically)? 是否可以在不使用y = sin(2*pi*x*t)情况下将信号y(t)的频率更改为x Hz的任意频率(因为我要更改的实际信号不是分析给出)?


What I actually want to do is comparing the signal form of signals with different frequencies by changing their frequency to a common one and overlay them. 我实际上想做的是通过将不同频率的信号频率更改为相同的频率并进行叠加来比较不同频率的信号的信号形式。 It is important that the different signals can be evaluated at the same time points. 重要的是,可以在同一时间点评估不同的信号。

Looks like you want to perform frequency shifting. 看起来您想执行频移。 This topic is very old and you can find discussion in many places. 这个主题很老,您可以在许多地方找到讨论。 Eg https://www.dsprelated.com/showthread/comp.dsp/9996-1.php 例如https://www.dsprelated.com/showthread/comp.dsp/9996-1.php

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

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