How to plot sawtooth wave sawtooth function?

조회 수: 2 (최근 30일)
Issie
Issie 2018년 12월 1일
편집: Issie 2018년 12월 6일

채택된 답변

Star Strider
Star Strider 2018년 12월 1일
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개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by