how can i plot a periodic function such as sawtooth or gate function over a defined period
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Chad Gray
am 19 Feb. 2016
Kommentiert: Nicholas Chorette
am 23 Okt. 2021
i have to plot a periodic function like a sawtooth signal or a gate signal and it has to repeat itself over period t1 = 3
0 Kommentare
Akzeptierte Antwort
MHN
am 19 Feb. 2016
t = 10; % total simulation time
T = 3; % period
x = 0:0.1:t;
% lets say your original function is y=2*x which repeated every T second, then
y = 2*(mod(x,T));
plot(x,y)
2 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!