How to input this function for calculating furrier series

2 ビュー (過去 30 日間)
Kamyar D
Kamyar D 2020 年 12 月 26 日
コメント済み: Kamyar D 2020 年 12 月 29 日
Hello everyone
I have a very simple code for Adcanced mathematics and I cant find the way to input the Function.
this code is to find furrier series and plot it then compare it with the main function plot.
so this is my code
and my problem is that i cant find a way to input this function and yes I have search the net for days now and cant find anything useful
Please guide me and Thank you

採用された回答

Walter Roberson
Walter Roberson 2020 年 12 月 26 日
y = piecewise(x < 2, 2*x-8, x > 2, x*cos(x), nan)
The nan is there to emphasize to readers that the output of piecewise() returns nan when none of the input conditions match, as would be the case for x == 2 exactly.
Reminder: boundary conditions are important for fourier transform purposes.
  1 件のコメント
Kamyar D
Kamyar D 2020 年 12 月 29 日
Thank you very very much

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by