Effacer les filtres
Effacer les filtres

How to plot something like this??

2 vues (au cours des 30 derniers jours)
Daniel Schilling
Daniel Schilling le 5 Nov 2018
Commenté : madhan ravi le 5 Nov 2018
x = 0.6*(u(t+2)-(cos(pi*t)+1)*(u(t+1)-u(t-1))-u(t-2))
t = -5:51:5
plot(x,t)
When running this i get that u is an undefined variable. U in this case is a shifted step function however which is bounding my cos function. What am I missing here?

Réponse acceptée

madhan ravi
madhan ravi le 5 Nov 2018
  2 commentaires
Daniel Schilling
Daniel Schilling le 5 Nov 2018
Ok fair. I realized after I posted this I had to define the piecewise function for the step. Now my question is, using the example you provided, I'm being told piecewise is an undefined function. Is that not built in?
madhan ravi
madhan ravi le 5 Nov 2018

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots 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