0001 function masked_map= mask_meg(x,y,z,map,theta_max) 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) = -100; 0010 end 0011 if (abs(az(i,j)) < 0.7 & el(i,j) >= 80*pi/180) 0012 masked_map(i,j) = -100; 0013 end; 0014 end; 0015 end; 0016 0017