""" Created On Sun Oct 23 21:05:24 2022 @author: 92322 """: Print
""" Created On Sun Oct 23 21:05:24 2022 @author: 92322 """: Print
"""
Created on Sun Oct 23 21:05:24 2022
@author: 92322
"""
# Defining and printing a complex no. in rectangular form
z = 5 - 3j
print(z)
#%%
#%%
import math
theeta = 15 #theeta is in degrees
theeta_1 = theeta * (math.pi/180)
z = math.tan(theeta_1)
print(z)
#%%
import cmath
import math # To use math.pi function
z = 5 - 3j
print(cmath.polar(z)) # Both Magnitude and angle displayed
print(cmath.polar(z)[0]) # Only magnitude is displayed
print(cmath.polar(z)[1]) # Only angle is displayed in radians
print(cmath.polar(z)[1] * (180/math.pi)) # Only angle is displayed in degrees
#%%
1
import cmath
import math # To use math.pi function
#%%
import numpy as np
#%%
#%%
import numpy as np
#%%
PhaseShift = 90 * (np.pi/180)
t = np.linspace(0,1,41000)
f = 5
v1 = 5 * np.sin(2*np.pi*f*t)
v2 = 1 * np.sin( (2*np.pi*f*t) + PhaseShift)
v3 = np.exp(-10*t)
plt.figure(1)
plt.plot(t,v1,color='red')
plt.plot(t,v2,color='blue')
plt.plot(t,v3,color='orange')
plt.grid()
plt.xlabel('Time')
plt.ylabel('Voltage')