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