creating a sawtooth signal via matlab function block
Ältere Kommentare anzeigen
Hello everyone, I am trying to make a sawtooth signal in simulink via matlab function block, the code:
function y = fcn(t)
y=t-floor(t/1)
end
what i get is something similar to a sawtooth:


the signal does not drop immediately, it take's about 0.8 seconds to drop down to 0 which makes it more like a triangle signal. is there a way to make it more accurate? or maybe is there another way to make a sawtooth signal in simulink via matlab function?
Thanks in advance.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!