How to plot below function f
조회 수: 22 (최근 30일)
이전 댓글 표시

댓글 수: 0
채택된 답변
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
댓글 수: 2
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!