How to plot sawtooth wave sawtooth function?

2 Ansichten (letzte 30 Tage)
Issie
Issie am 1 Dez. 2018
Bearbeitet: Issie am 6 Dez. 2018

Akzeptierte Antwort

Star Strider
Star Strider am 1 Dez. 2018
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.

Weitere Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by