function[ikstararr]=ikstar(dx,dy,kxdx,kydy,spmeth)

%spmeth=0   second order upwind
if spmeth==0
ikstararr=zeros(1,4);
%Forward Differencing on x 
ikstararr(1)=(-3+4*exp(i*kxdx)-exp(2*i*kxdx))/(2*dx);

%Backward Differencing on x
ikstararr(2)=(3-4*exp(-i*kxdx)+exp(-2*i*kxdx))/(2*dx);

%Forward Differencing on y
ikstararr(3)=(-3+4*exp(i*kydy)-exp(2*i*kydy))/(2*dy);

%Backward Differencing on y
ikstararr(4)=(3-4*exp(-i*kydy)+exp(-2*i*kydy))/(2*dy);

end

%spmeth=1
if spmeth=1

ikstararr=zeros(1,2);
%