x(t) = 2*u((-t/4)+2), |t|<=10

2 vues (au cours des 30 derniers jours)
milton
milton le 5 Nov 2020
I want to plot the above equation in matlab but i dont know how to plot please help or provide me code

Réponse acceptée

Ameer Hamza
Ameer Hamza le 5 Nov 2020
Modifié(e) : Ameer Hamza le 5 Nov 2020
I guess u is the unit-step function. You can try this if you have symbolic toolbox
syms t
x = 2*heaviside(-t/4+2);
fplot(x, [-10 10]);
Without symbolic toolbox
u = @(x) 1*(x>=0);
t = -10:0.01:10;
x = 2*u(-t/4+2);
plot(t, x)
  2 commentaires
milton
milton le 5 Nov 2020
thakns a lot! it worked perfectly!
Ameer Hamza
Ameer Hamza le 5 Nov 2020
I am glad to be of help!

Connectez-vous pour commenter.

Plus de réponses (1)

Ibrahem Ahmed
Ibrahem Ahmed le 16 Mar 2021
u = @(x) 1*(x>=0); t = -10:0.01:10; x = 2*u(-t/4+2); plot(t, x)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by