Generate a chirp waveform using the fourier series expansion
조회 수: 3 (최근 30일)
이전 댓글 표시
hello, I need help with this fourier series in MATLAB and due to my lack of experience I am having trouble even beginning this assignment.. it would mean a lot if someone could help me with some of this coding.




댓글 수: 0
답변 (1개)
Gautam
2025년 2월 7일
Hello Kevin,
Esentially, in this problem, you are given the coefficient of the sine term of the Fourier series expansion for the function g(x). All you have to do is take the sum of the first N sine terns multiplied by their coefficients.
Here's the code that does it for the first 8 terms. You can modify the code according to you requirement and format the output using the fommands mentioned in the problem statement.
N = 8;
x = linspace(0,2,50);
F=0;
bn = @(n) (2/pi)*(((-1)^(n+1))/n);
for n = 1:N
F = F + bn(n)*sin(n*pi*x);
end
plot(x,F)
댓글 수: 0
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!