0001 function masked_map= mask_fixval_eeg(x,y,z,map,theta_max,fixval) 0002 0003 [az,el,r] = cart2sph(x,y,z); 0004 el = (pi/2)*ones(size(el,1),size(el,2)) - el; 0005 masked_map = map; 0006 for i=1:size(map,1) 0007 for j=1:size(map,2) 0008 if el(i,j) >= theta_max*pi/180; 0009 masked_map(i,j) = fixval; 0010 end; 0011 end; 0012 end;