How do you solve a periodic function with more then 1 period?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How do you solve a periodic function with more than 1 period? I have a function with one period that has the code
f=@(x)2*mod(x,1)-1
This is for 1 period how do I adjust this to have 5 periods.
[merged from duplicate question]
Let f1(x) = 2x−1 for x ∈ [−1,+1) where this function is also extended periodically to the entire line (where each period is 2 units long). Plot it over 5 complete periods. Then define it as an anonymous function
0 comentarios
Respuestas (1)
Star Strider
el 3 de Feb. de 2016
See if this does what you want:
f=@(x)2*mod(x,1)-1
x = linspace(0, 5);
figure(1)
plot(x, f(x))
grid
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!