How to plot below function f
18 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Star Strider
2019-8-15
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
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
