Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Good day.
I was hoping you could help me with my assignment on programming a fourier series analysis.
Can someone teach me how to graph this on mathcad prime? I need to find the function that will replicate the attached file below.
Your help would be much appreciated, since I am still learning from this software.
Thank you in advance and God Bless.
Solved! Go to Solution.
The Nt seems to be the number of harmonics, if I am not misinterpreting it.
Why for the first harmonic Nt should be 2?
Nt shouldn't it be 1 for the first harmonic?
The image above shows the first harmonic and for that Nt needs to be equal with 2.
Your sheet calculates the first two harmonics of the signal.
BUT, the Fourier sequence of a square wave only contains odd harmonics. So from the first 2 harmonics only the first is (and should be !) visible. The second harmonic is zero.
If you set Nt:=3 I suspect that you should see the result of first and third harmonics added.
Success!
Luc
I know that the square wave signal has only the odd harmonics, but the first harmonic is the first harmonic, and it is odd:).
What it's your opinion about this sequence?
My conclusion: There's a 2 missing in each of the sin() and cos() arguments of the Fourier functions that you are using.
The correct function to create a sine of frequency F is not sin( pi * F * t) but sin(2 * pi * F * t).
Now your n has to step twice as much paces to run past all harmonics.
Success!
Luc