Effacer les filtres
Effacer les filtres

hi , i have this code..

2 vues (au cours des 30 derniers jours)
Anish Madhok
Anish Madhok le 17 Avr 2015
Modifié(e) : Anish Madhok le 18 Avr 2015
clear all
dt=.001;
t=[-60:dt:60];
%%ractangular pulse.
me(ms)');
ylabel('Amplitude(V)');
rge=40;
axis([-rge rge 0 6]);
pause
i want to shift it by 2 m sec on the left pls help

Réponse acceptée

pfb
pfb le 17 Avr 2015
Modifié(e) : pfb le 17 Avr 2015
Well... you can simply shift your time scale. Anyway your xlim is less than the range of t. If Dt is your translation (in your case Dt=2)
Instead of
plot(t,x);
use
plot(t-Dt,x);
Otherwise you can do the translation in the argument of your function.
x=(5/2)*(sign(t+2+Dt)-sign(t-2+Dt));
What's with the pause command at the end of your code?

Plus de réponses (0)

Catégories

En savoir plus sur Time Series dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by