채택된 답변

Star Strider
Star Strider 2018년 12월 1일

0 개 추천

You are very close.
Try this:
f = @(x) rem(x+3,2)-1
figure
fplot(f, [-3,3])
It offsets the ‘x’ value, subtracts 1 so the limits are appropriate, then does the plot.
It may not be universally applicable, for all ‘x’. It works here for this particular problem.

추가 답변 (0개)

카테고리

질문:

2018년 12월 1일

편집:

2018년 12월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by