/ Published in: Python
This code is connected to following youtube video on complex plane.
http://youtu.be/oPIEH6hivEw
http://youtu.be/oPIEH6hivEw
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# -*- coding: utf-8 -*- """ Created on Mon Aug 04 22:20:13 2014 @author: Anish """ # -*- coding: utf-8 -*- """ Spyder Editor """ # Importing libraries import os os.system('cls') import numpy as np import matplotlib.pyplot as plt import math #------------------------------------------------------------------------------ # Parameters N = 145.0; k = 1.0 #l = 5.0; #------------------------------------------------------------------------------ # Definition of the array and the sinusoids nvec = np.linspace(-N+1, N-1, num=N) y1 = tan(pi*k*nvec/N) #y2 = cos(2.0*pi*l*nvec/N) #------------------------------------------------------------------------------ # Plotting plt.plot(180*nvec/N,y1,'or-') plt.ylabel('Tanget',fontsize=14, color='blue') plt.xlabel('Angle (Degrees)',fontsize=14, color='blue') plt.show() #------------------------------------------------------------------------------
URL: PlotTanX