Plot intervall function in Matlab
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, how can I plot this function, with even and odd parts?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1112720/image.png)
0 Commenti
Risposte (1)
Abderrahim. B
il 31 Ago 2022
Hi!
Use piecewise and fplot.
syms t
xThree = piecewise( t <= 2 ,1 ,(t > 2) & (t <= 4), t-2, t >= 4, 1)
fplot(xThree)
Hope this helps
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!