The document describes a MATLAB code that takes user input to simulate an array of current elements and plot the resulting far-field pattern. It takes in the number of elements, wavelength, magnitude and phase of each current element, and each element's position. It calculates the far-field as a function of angle by summing the contributions of each element. Finally, it plots the far-field pattern on a polar plot.
The document describes a MATLAB code that takes user input to simulate an array of current elements and plot the resulting far-field pattern. It takes in the number of elements, wavelength, magnitude and phase of each current element, and each element's position. It calculates the far-field as a function of angle by summing the contributions of each element. Finally, it plots the far-field pattern on a polar plot.
The document describes a MATLAB code that takes user input to simulate an array of current elements and plot the resulting far-field pattern. It takes in the number of elements, wavelength, magnitude and phase of each current element, and each element's position. It calculates the far-field as a function of angle by summing the contributions of each element. Finally, it plots the far-field pattern on a polar plot.
The document describes a MATLAB code that takes user input to simulate an array of current elements and plot the resulting far-field pattern. It takes in the number of elements, wavelength, magnitude and phase of each current element, and each element's position. It calculates the far-field as a function of angle by summing the contributions of each element. Finally, it plots the far-field pattern on a polar plot.
N = input ( 'Enter The Number Of Array Elements : ' ) ;
lambda = input ( 'Enter The Value Of Lambda (c/f) : ' ) ; B = (2*pi/lambda); for I = 1 : N Current = I Cm(I) = input ( 'Enter the Magnitude of the Current in Amperes : ' ) ; Cp(I) = input ( 'Enter the Phase of the Current : ' ) ; K = input ( 'Enter the Position of Element on X-axis : ' ) ; C(I) = Cm(I) * exp(1j * B * sin(Cp(I)*pi/180)); end %Plot of The Output Polar u = 0:0.01:2*pi ; %0<u<2*pi H = 0; for I = 1 : N H = H + ( C(I) .* exp ( -1j * ( I-1 ) * K * sin (u) ) ) ; end F = abs(H); figure ( 1 ) , polar ( u , F ) ;