how can I do this in mat lab

2 vues (au cours des 30 derniers jours)
Shouq A
Shouq A le 6 Avr 2020
Commenté : Shouq A le 6 Avr 2020
how can i type this equation in matlab x(t)= cos(πt)[u(t) − u(t − 1)] and h(t) = 1.5[u(t) − u(t − 1.5)] ???
  1 commentaire
darova
darova le 6 Avr 2020
What is u(t)?

Connectez-vous pour commenter.

Réponse acceptée

Birdman
Birdman le 6 Avr 2020
syms u(t) x(t) h(t)
u(t)=piecewise(t>=0,1,0);
x(t)=cos(pi*t)*(u(t)-u(t-1));
h(t)=1.5*(u(t)-u(t-1.5));
%%plot
t=0:0.001:5;
plot(t,x(t),t,h(t));legend('x(t)','h(t)')
  1 commentaire
Shouq A
Shouq A le 6 Avr 2020
thank you so much

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by