Borrar filtros
Borrar filtros

How could I make a periodic function in MatLab

15 visualizaciones (últimos 30 días)
John Nosh
John Nosh el 3 de Sept. de 2017
Respondida: ali vatan el 4 de Sept. de 2020
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?

Respuesta aceptada

Walter Roberson
Walter Roberson el 3 de Sept. de 2017
f = @(t) 2 * mod(t, 5);
fplot(f, [-10 10])

Más respuestas (1)

ali vatan
ali vatan el 4 de Sept. de 2020
f = @(t) 2 * mod(t, 5);
fplot(f, [-10 10])

Community Treasure Hunt

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

Start Hunting!

Translated by