How to plot below function f

 Risposta accettata

Star Strider
Star Strider il 15 Ago 2019
This is how I would do it:
f = @(x) (x/4).*((x > 0) & (x < 1)) + (x/3).*(x >= 1);
t = linspace(-5, 5);
figure
plot(t, f(t))
grid

2 Commenti

Thanks
Star Strider
Star Strider il 15 Ago 2019
As always, my pleasure.

Accedi per commentare.

Più risposte (0)

Categorie

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by