function [I] = beamcurrent(N)
r0=0.01;
epsilon0=((8.8)*(10^(-12)));
c=(3*(10^(8)));
V=10^(3);
z1=14.07;
k0=(z1/r0);
h=-(1/((20*pi)*(r0*epsilon0)));
f=((k0*c)/(2*pi));
for j=1:N
   lambda(j)=-((((pi*r0)*c)/((2*epsilon0)*k0))*(sin(((2*k0)*c)*(j/N))));
   mu(j)=((c/((k0*r0)*(epsilon0)))*(sin(((k0*c)*(j/N)))));
   nu(j)=((sin((k0*r0))/(r0*epsilon0)*((k0)^(2)))*cos((k0*c)*(j/N)));
   
end;
Q(1)=0;
for j=1:N
Q(j+1)=Q(j)+((1/N)*((lambda(j)+(Q(j)*mu(j)))/((V)+(h*Q(j))+(nu(j)))));    
I(j)=(N*(Q(j+1)-Q(j)));    
    
end
end

