필터 지우기
필터 지우기

Fourier Series Coefficients Ck

조회 수: 7 (최근 30일)
Matthew Benjamin
Matthew Benjamin 2013년 3월 7일
I am not at all skilled in Matlab and my teacher just expects us to know how to code. I am asking for a lot of help here. I have a problem with a graph of periodic repition and N=10 (N is the period) with length L=5. The amplitude of the graph is 1. So when 0<=n<L x(n) equals 1, otherwise it is 0. How would I calculate the fourier series coefficeints and plot the absolute value of Ck^2 (when k=0:N-1)?
PLEASE HELP I'M DESPERATE!
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 3월 8일
What is Ck in your notation ?
Matthew Benjamin
Matthew Benjamin 2013년 3월 8일
Ck are the Fourier coefficients

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

채택된 답변

Rick Rosson
Rick Rosson 2013년 3월 8일
편집: Rick Rosson 2013년 3월 8일
Here is a start:
N = 10;
L = 5;
n = 0:N-1
x = ...
C = ...
figure;
stem(n,x);
figure;
stem(n,abs(C));
For help on Fourier:
>> doc fft
>> doc fftshift

추가 답변 (1개)

Walter Roberson
Walter Roberson 2013년 3월 8일
Are you talking about a square wave with duty cycle 1/2 and amplitude 1? Or are you talking about a single square pulse? If you are talking about a single square pulse, it is a difference of step functions.
Are you going for analytic calculation or for numeric calculation?
  댓글 수: 2
Matthew Benjamin
Matthew Benjamin 2013년 3월 8일
It has 5 separate pulses. I need a numerical calculation.
Walter Roberson
Walter Roberson 2013년 3월 8일
Your description is not compatible with it having 5 pulses. You wrote "when 0<=n<L x(n) equals 1, otherwise it is 0" which describes a single pulse over [0,L) with L=5

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

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by