필터 지우기
필터 지우기

piecewise function Fourier seriers

조회 수: 4 (최근 30일)
KUN
KUN 2024년 3월 3일
댓글: Paul 2024년 3월 3일
I want use matlab help to derive the Fourier series of a piecewise function. I write code like following:
syms t Vin Vout Dp Ds D T
assume(t>0);
Vp = piecewise( ...
t> 0 & t< Dp*T/2, Vin, ...
t> (Dp*T/2) & t< T/2,0, ...
t> T/2 & t< (1+Dp)*T/2, -Vin, ...
t> (1+Dp)*T/2 & t< T, 0)
Vpf = fourier(Vp)
assume(t,'clear');
and result is :
fourier(piecewise(t < (Dp*T)/2, Vin, t < T/2&(Dp*T)/2 < t, 0, t < (T*(Dp + 1))/2&T/2 < t, -Vin, t < T&(T*(Dp + 1))/2 < t, 0), t, w)
The result does not helpful for me.
  댓글 수: 2
Torsten
Torsten 2024년 3월 3일
Maybe assuming 0 < Dp < 1 can help.
KUN
KUN 2024년 3월 3일
Thank you for reminding me.

댓글을 달려면 로그인하십시오.

답변 (1개)

Paul
Paul 2024년 3월 3일
Hi KUN,
In the context of the Fourier transform, I'm not sure that the assumption on t makes sense, at least not in the context of fourier.
IIRC, fourier doesn't like piecewise. Instead, form Vp with terms using rectangularPulse and then find the Fourier transform.
  댓글 수: 2
KUN
KUN 2024년 3월 3일
Thank you for your answer. I will try rectangularPulse.
Paul
Paul 2024년 3월 3일
Feel free to post back here with updated code if you still have trouble after trying rectangularPulse.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by