Changeset 1062 for trunk/src/proj_field.m
- Timestamp:
- Mar 21, 2019, 6:35:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/proj_field.m
r1061 r1062 574 574 NbSegment=0; 575 575 case 'rectangle' 576 LineCoord([1 4],1)=ObjectData.Coord(1,1)-ObjectData. RangeX;577 LineCoord([1 2],2)=ObjectData.Coord(1,2)-ObjectData. RangeY;578 LineCoord([2 3],1)=ObjectData.Coord(1,1)+ObjectData .RangeX;579 LineCoord([4 1],2)=ObjectData.Coord(1,2)+ObjectData.RangeY ;576 LineCoord([1 4],1)=ObjectData.Coord(1,1)-ObjectData.num_RangeX_2; 577 LineCoord([1 2],2)=ObjectData.Coord(1,2)-ObjectData.num_RangeX_2; 578 LineCoord([2 3],1)=ObjectData.Coord(1,1)+ObjectData_RangeX_2; 579 LineCoord([4 1],2)=ObjectData.Coord(1,2)+ObjectData.RangeY-Y2; 580 580 case 'polygon' 581 581 LineCoord(NbPoints+1)=LineCoord(1); … … 1610 1610 ProjData.(AXName)=[coord_x_proj(1) coord_x_proj(end)]; %record the new (projected ) x coordinates 1611 1611 [X,YI]=meshgrid(coord_x_proj,coord_y_proj);%grid in the new coordinates 1612 XI=ObjectData.Coord(1,1)+(X)*cos(PlaneAngle( 2))-YI*sin(PlaneAngle(1));%corresponding coordinates in the original system1613 YI=ObjectData.Coord(1,2)+(X)*sin(PlaneAngle( 2))+YI*cos(PlaneAngle(1));1612 XI=ObjectData.Coord(1,1)+(X)*cos(PlaneAngle(1))-YI*sin(PlaneAngle(1));%corresponding coordinates in the original system 1613 YI=ObjectData.Coord(1,2)+(X)*sin(PlaneAngle(1))+YI*cos(PlaneAngle(1)); 1614 1614 1615 1615 if numel(Coord{1})==2% x coordinate defined by its bounds, get the whole set
Note: See TracChangeset
for help on using the changeset viewer.