Generate a chirp waveform using the fourier series expansion
    4 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
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 commentaires
Réponses (1)
  Gautam
 le 7 Fév 2025
        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 commentaires
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


