How to plot below function f

1 view (last 30 days)
HEMANT K NASHINE
HEMANT K NASHINE on 15 Aug 2019
Commented: Star Strider on 15 Aug 2019

Accepted Answer

Star Strider
Star Strider on 15 Aug 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

More Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!