MATLAB: How could I make a periodic function in MatLab

functionsperiodic function

For example I have a function f(x)=2*t how could I make the function repeat every t=5 seconds ? After creating it I would like to plot it. Any ideas how someone could approach this?

Best Answer

f = @(t) 2 * mod(t, 5);
fplot(f, [-10 10])
Related Question