Graphics Programs Reference
In-Depth Information
% winid ==> window identifier; winid negative ==> no window ; winid posi-
tive ==> use window given by win
% win ==> input window function (2-D window) MUST be of size (Nxr X Nyr)
% nbits is the number of nbits used in phase quantization; nbits negative ==>
NO quantization
%%%%% *********** OUTPUTS ************* %%%%%%%
% pattern ==> directive gain pattern
%%%%%%% ************************ %%%%%%%%%%%%
eps = 0.0001;
nx = 0:Nxr-1;
ny = 0:Nyr-1;
i = sqrt(-1);
% check that window size is the same as the array size
[nw,mw] = size(win);
if winid >0
if nw ~= Nxr
fprintf('STOP == Window size must be the same as the array')
return
end
if mw ~= Nyr
fprintf('STOP == Window size must be the same as the array')
return
end
end
%if dol is > 0.5 then; choose dol = 0.5 and compute new N
if(dolxr <=0.5)
ratiox = 1 ;
dolx = dolxr ;
Nx = Nxr ;
else
ratiox = ceil(dolxr/.5) ;
Nx = (Nxr -1 ) * ratiox + 1 ;
dolx = 0.5 ;
end
if(dolyr <=0.5)
ratioy = 1 ;
doly = dolyr ;
Ny = Nyr ;
else
ratioy = ceil(dolyr/.5) ;
Ny = (Nyr -1) * ratioy + 1 ;
doly = 0.5 ;
end
Search WWH ::




Custom Search