Plot intervall function in Matlab

4 次查看(过去 30 天)
Hi, how can I plot this function, with even and odd parts?

回答(1 个)

Abderrahim. B
Abderrahim. B 2022-8-31
Hi!
Use piecewise and fplot.
syms t
xThree = piecewise( t <= 2 ,1 ,(t > 2) & (t <= 4), t-2, t >= 4, 1)
xThree = 
fplot(xThree)
Hope this helps

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by