Return to Snippet

Revision: 67117
at August 13, 2014 23:21 by aturlapaty


Initial Code
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 12 19:59:00 2014

@author: Anish
"""

# Importing libraries 
import os
os.system('cls')
import numpy as np
import matplotlib.pyplot as plt
#j = sqrt(-1)
r0 = 2.0
theta = pi/4.0
x0 = r0*cos(theta)
y0 = r0*sin(theta)
zvec = [x0+1j*y0,x0-1j*y0, sqrt(x0**2 +y0**2), -x0-1j*y0,-x0+1j*y0]

for ix in range(0, 5):
    x = real(zvec[ix])
    y = imag(zvec[ix])    
    plot(x,y,'o')    
    text(x, y,'z%1.0f'%(ix),fontsize = 12)
    
plt.xlabel('real')
plt.ylabel('imaginary')

Initial URL
transformations of a complex number

Initial Description
Effect of rotating the phase of the complex number

Initial Title
Basic transformations on complex number

Initial Tags


Initial Language
Python