How to plot a shifted signal?

I'd like to shift any signal, be it periodic or non-periodic without using in-built functions like circshift(). How would I do this? I'm seeking to understand shifting conceptually and would love to have code examples.

Réponses (1)

Matt J
Matt J le 7 Nov 2023
Modifié(e) : Matt J le 7 Nov 2023
One way:
t=linspace(0,2*pi);
y=sin(t);
plot(t,y,t-pi/2,y,'x'); legend Original Shifted

Catégories

En savoir plus sur Interactive Control and Callbacks dans Centre d'aide et File Exchange

Question posée :

le 7 Nov 2023

Modifié(e) :

le 7 Nov 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by