%clear all;
%close all;

function e = dipol(shift)


lam=1;
k=2*pi/lam;
L=lam/4; %L=length of monopole.
t=(pi/180):(pi/180):2*pi;

    num=cos(k*L)-cos(k*L*cos(t));
        den=sin(t);
        e=abs(num./den);
        deg=t*180/pi;
%         
%         subplot(1,2,1);
%         polar(t,e);
%         subplot(1,2,2);
%         plot(deg,e);
    
        
  if shift > 0
            
            for q = 1:1:shift
    
             hold = e(1);
   
              for i = 1:1:359
              e(i) = e(i+1);
              end
              e(360) = hold;
    
             q = q+1;
    
            end

  end
 
      
%         subplot(1,2,1);
%         polar(t,e);
%         subplot(1,2,2);
%         plot(deg,e);