Peter123
Peter123

Reputation: 567

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.

Upvotes: 0

Views: 2130

Answers (1)

Andrei Davydov
Andrei Davydov

Reputation: 315

Looks like you want to perform frequency shifting. This topic is very old and you can find discussion in many places. E.g. https://www.dsprelated.com/showthread/comp.dsp/9996-1.php

Upvotes: 1

Related Questions