简体   繁体   中英

Changing the frequency of a signal using Matlab

I want to change the frequency of a given oscillatory signal y(t) using Matlab.


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.

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)?


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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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