function periodic in matlab
5 views (last 30 days)
Show older comments
i have a function (f=x^2 for -pi/2<=x<=pi/2) and i want to make this function periodic , how i can do it?
0 Comments
Answers (1)
the cyclist
on 29 Oct 2021
I think this does what you want:
x = -3*pi : 0.01 : 3*pi;
f = @(x) (mod(x+pi/2,pi) - pi/2).^2;
figure
plot(x,f(x))
0 Comments
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!