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?

답변 (1개)

the cyclist
the cyclist 2021년 10월 29일

0 개 추천

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))

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

질문:

2021년 10월 29일

답변:

2021년 10월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by