How to plot this function ?

1 vue (au cours des 30 derniers jours)
Wasp Hamberg
Wasp Hamberg le 31 Oct 2018
Commenté : Wasp Hamberg le 31 Oct 2018
U(t)={=-t,t=(0,pi/2); = 0, (pi/2,pi)}

Réponse acceptée

the cyclist
the cyclist le 31 Oct 2018

Here is one way:

U = @(t) -(t<pi/2).*t + (t>=pi/2) * 0; % Don't really need that second term, since it is always zero
figure
tt = 0:0.01:pi;
plot(tt,U(tt),'.')
  1 commentaire
Wasp Hamberg
Wasp Hamberg le 31 Oct 2018
Thank you so much)))

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB 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