Fourier Series on MATLAB
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How do i write code to produce periodic functions (including sinusoidal, triangle, sawtooth, square waves) and square pulse trains of varying amplitudes, frequencies, phases, and duty cycles using Fourier Series on MATLAB.
1 Kommentar
John D'Errico
am 9 Nov. 2020
Far too vague to get a serious answer, this question is looking for tutoring in the subject of Fourier series and in MATLAB, but is not a question about anything at this point.
Antworten (1)
Setsuna Yuuki.
am 9 Nov. 2020
Bearbeitet: Setsuna Yuuki.
am 9 Nov. 2020
You need know the fuction of each wave form and use a "for" with fourier series.
For example: ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/408130/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/408130/image.png)
components = 1; t = 0:1e-2:10;
sumatoria = 0; i = 1;
figure;
for k = 1:1:components
n=2*k-1;
serie=2/pi*1/n*sin(n*pi*t);
sumatoria = serie+sumatoria;
end
sumatoria = 1/2+sumatoria;
figure;
plot(t,sumatoria);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/408230/image.jpeg)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Waveform Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!