Changeset 575 for trunk/src/mouse_down.m
- Timestamp:
- Feb 27, 2013, 6:39:32 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_down.m
r543 r575 114 114 for icell=1:numel(CellVarIndex)%look for all physical fields 115 115 if NbDim(icell)==2 % select 2D field 116 if isfield(Field,' Mesh') && ~isempty(Field.Mesh)&& ~isempty(VarType{icell}.coord_x) && ~isempty(VarType{icell}.coord_y)%case of unstructured data116 if isfield(Field,'CoordMesh') && ~isempty(Field.CoordMesh)&& ~isempty(VarType{icell}.coord_x) && ~isempty(VarType{icell}.coord_y)%case of unstructured data 117 117 eval(['X=Field.' Field.ListVarName{VarType{icell}.coord_x} ';']) 118 118 eval(['Y=Field.' Field.ListVarName{VarType{icell}.coord_y} ';']) 119 flag_vec=(X<(xy(1,1)+Field. Mesh/4) & X>(xy(1,1)-Field.Mesh/4)) & ...%flagx=1 for the vectors with x position selected by the mouse120 (Y<(xy(1,2)+Field. Mesh/4) & Y>(xy(1,2)-Field.Mesh/4));%f119 flag_vec=(X<(xy(1,1)+Field.CoordMesh/4) & X>(xy(1,1)-Field.CoordMesh/4)) & ...%flagx=1 for the vectors with x position selected by the mouse 120 (Y<(xy(1,2)+Field.CoordMesh/4) & Y>(xy(1,2)-Field.CoordMesh/4));%f 121 121 ivec=find(flag_vec,1);% search the (first) selected vector index ivec 122 122 end
Note: See TracChangeset
for help on using the changeset viewer.