0001 function [index_incyl,mat]=elems_in_cylinder(center_simp,origin,radius,mat,value);
0002
0003
0004
0005
0006
0007
0008
0009
0010 warning('EIDORS:deprecated',[ ...
0011 'ELEMS_IN_CYLINDER is deprecated as of 06-Jun-2012. Use MK_C2F_CIRC_MAPPING.']);
0012
0013 index_incyl=[];
0014 a=origin(1);
0015 b=origin(2);
0016 r=radius;
0017
0018 for i=1:size(center_simp,1);
0019
0020 x=center_simp(i,1);
0021 y=center_simp(i,2);
0022 r_squared_calc=((x-a)^2)+((y-b)^2);
0023
0024 if r_squared_calc <= r^2
0025 index_incyl(i,1)=1;
0026 else
0027 index_incyl(i,1)=0;
0028 end
0029
0030 i=i+1;
0031
0032 end
0033
0034 for i=1:size(center_simp);
0035
0036 if index_incyl(i,1)==1;
0037 mat(i,1)=value;
0038 i=i+1;
0039 end
0040 end