How to plot this function ?

1 次查看(过去 30 天)
U(t)={=-t,t=(0,pi/2); = 0, (pi/2,pi)}

采纳的回答

the cyclist
the cyclist 2018-10-31

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),'.')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Objects 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by