How to plot below function f

19 vues (au cours des 30 derniers jours)
HEMANT K NASHINE
HEMANT K NASHINE le 15 Août 2019
Commenté : Star Strider le 15 Août 2019

Réponse acceptée

Star Strider
Star Strider le 15 Août 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 commentaires
HEMANT K NASHINE
HEMANT K NASHINE le 15 Août 2019
Thanks
Star Strider
Star Strider le 15 Août 2019
As always, my pleasure.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots 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