Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a python program that plot the fundamental hormonic and the 2nd , 3rd, 4th, 5th , 6th , 7th , 8th and 9th harmonic
Write a python program that plot the fundamental hormonic and the 2nd , 3rd, 4th, 5th , 6th , 7th , 8th and 9th harmonic of the problem 7. Hint: Start with the program from #7 and modify it by adding a loop to produce the harmonics.
Your final graph should be look like the figure below. Figure size = (16,8):
#program from problem 7
import matplotlib.pyplot as plt import numpy as np import pandas as pd f = 60 T = 1 / f step = T / 100 t = np.arange(0, T, step) y = np.sin(2*np.pi*f*t) plt.plot(t*1000, y) plt.title('Fundamental Harmonic f=60Hz') plt.xlabel('Time (ms)') plt.ylabel('Magnitude') plt.legend(['f=60Hz']) plt.show()8. Write a python program that plot the fundamental hormonic and the 2nd, 3rd,4 th, 5 th, 6 th, 7 th , 8th and 9 th harmonic of the problem 7. Hint: Start with the program from \#7 and modify it by adding a loop to produce the harmonics. Your final graph should be look like the figure below. Figure size =(16,8)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started