{ "metadata": { "name": "", "signature": "sha256:e5e51717065f48c86dca50bb80c877a8dccdac1a1049a8aa680cfb5df955894e" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter6, Antenna Arrays" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No. 6.2.1, page 6-13" ] }, { "cell_type": "code", "collapsed": false, "input": [ "n=2 #(No. of point source)\n", "#E=E0*{exp(%i*pi/2)-exp(-%i*si/2)} where exp(-%i*si)=-1\n", "#si=Beta*d*cosd(fi)=2*pi*cosd(fi)\n", "#E=2*%i*E0*sind(pi*cosd(fi)) But 2*%i*E0=1\n", "from numpy import arange, sin, pi, cos, nditer\n", "fi=arange(0,331,30) #degree(angle)\n", "En=sin(pi*cos(fi*pi/180)) #Normalized field\n", "print \" fi :\\t\",\n", "for x in fi:\n", " print x,\"\\t\",\n", "print \"\"\n", "print \"|En| :\\t\",\n", "for x in abs(En):\n", " print \"%0.2f\"%x,\"\\t\"," ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " fi :\t0 \t30 \t60 \t90 \t120 \t150 \t180 \t210 \t240 \t270 \t300 \t330 \t\n", "|En| :\t0.00 \t0.41 \t1.00 \t0.00 \t1.00 \t0.41 \t0.00 \t0.41 \t1.00 \t0.00 \t1.00 \t0.41 \t" ] } ], "prompt_number": 31 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No. 6.2.2, page 6-16" ] }, { "cell_type": "code", "collapsed": false, "input": [ "n=2 #(No. of point source)\n", "#E=E0*{exp(%i*(pi/4+si/2))-exp(-%i*(pi/4+si/2))} as exp(%i*theta)+exp(-%i*theta)=2*cos(theta)\n", "#E=2*E0*cos(pi/4+si/2) \n", "#si=Beta*d*cosd(fi)=2*pi*cosd(fi)\n", "#En=cos(pi/4+Beta*d*cosd(pi/4)) But 2*E0=1\n", "from numpy import arange, sin, pi, cos, nditer\n", "fi=arange(0,331,30) #degree(angle)\n", "En=cos(pi/4+pi/4*cos(fi*pi/180)) #Normalized field\n", "print \" fi :\\t\",\n", "for x in fi:\n", " print x,\"\\t\",\n", "print \"\"\n", "print \"|En| :\\t\",\n", "for x in abs(En):\n", " print \"%0.3f\"%x,\"\\t\"," ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " fi :\t0 \t30 \t60 \t90 \t120 \t150 \t180 \t210 \t240 \t270 \t300 \t330 \t\n", "|En| :\t0.000 \t0.105 \t0.383 \t0.707 \t0.924 \t0.994 \t1.000 \t0.994 \t0.924 \t0.707 \t0.383 \t0.105 \t" ] } ], "prompt_number": 36 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example No. 6.2.3, page 6-18" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#E=cos(fi)+sin(fi)