antenna radiation pattern(too urgent)

Status
Not open for further replies.
k frn thanks . Iwill check code wat u tell. k.

Added after 36 minutes:

frn I tried code as you but am getting error vector dimennsions must be same


thanks
 

I got that error at line

plot(-M:M, abs(AF), 'r');
 

see this complete code here

clc
clear all;
close all;

%----------- Common Parameters for both approaches ------------

N = input('Enter the value of N --------> ');
N = round(N); % convert to integer

if(mod(N,2) == 0)
M = N/2;
else
M = (N-1)/2;
end


lambda = 50;
samples = 'odd'; % possible values can be 'odd' or 'evn'
k = 2*pi/lambda;

if(samples == 'odd')
m = -M : M;
else
m = -M : M;
index = find(m == 0);
m(index) = [];
end

[row, col] = size(m);
bm = [zeros(1,2) ones(1,col-4) zeros(1,2)];

%--------------- Line Source Parameters & Code ----------------

d = lambda/2;
length = N*d;

kk = 1;
sum = 0;
jj = 1;
[row, col] = size(m);

for ii = 1 : col
mm = m(ii);
yy = cos_theta_m(mm, lambda, length, samples);
zz=z_m(mm,d,samples);
sum = sum + (bm(jj)*exp(-j*k*zz*yy));
jj = jj + 1;
AF(kk) = sum;
kk = kk + 1;
end
kk

%---------------------------- Lets plot the results -----------

figure; grid; hold on;

plot(-M:M, abs(AF), 'r');
xlabel('source psition z');
ylabel('Normalized current');
title('current distribution for linear array');


%----------------------------------------------------------------

run for N=123, yeilds

 

hii frns we want to plot with respect to z not with -M:M .
 

ok but your z here is not correct, you must do some thing to z such as normalization or other thing

Added after 4 minutes:

you must see in your program that the number of points in AF is equals to -M:1:M
 

k but i don't know h to do normalisation.


if u know how to do normalisation please help me.

thanks
 

k thanks.


that means is it requir to modify our program?

thanks
 

yes

Added after 3 hours 37 minutes:

hi friend,

in the following link there is a matlab codes for balanes (all chapters in matlab)



enjoy

Added after 1 hours 3 minutes:

did you get the programs from the above link? tell me please
 

hii frn
I got output for our program . Modofication to that is normlised value.


thnks for your great help.

Added after 4 minutes:

hii frn


I am n't getting programs for above link. pls help me.


thanks
 

any one know code for iterative sampling method
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…