Changeset 494 for trunk/src/proj_field.m
- Timestamp:
- Jul 19, 2012, 11:50:39 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/proj_field.m
r492 r494 1238 1238 ProjData.VarAttribute{ivar_new+1+nbcoord}.Role='errorflag'; 1239 1239 end 1240 % case 'filter'%interpolate data on a regular grid 1241 % errormsg='tps required for filter option' 1242 1240 1243 end 1241 1244 … … 2076 2079 eval(['ProjData.' AXName '=[Xbound(1) Xbound(2)];']) %record the new (projected ) x coordinates 2077 2080 end 2078 else % case with rotation and/or interpolation2081 elseif isfield(FieldData,'A') %TO GENERALISE % case with rotation and/or interpolation 2079 2082 if NbDim==2 %2D case 2080 2083 [X,Y]=meshgrid(coord_x_proj,coord_y_proj);%grid in the new coordinates … … 2104 2107 if test_filter 2105 2108 Aclass=class(FieldData.A); 2106 eval(['ProjData.' VarName '=filter2(Mfilter,FieldData.' VarName ',''valid'');'])2109 ProjData.(VarName)=filter2(Mfilter,FieldData.(VarName),'valid'); 2107 2110 if ~isequal(Aclass,'double') 2108 eval(['ProjData.' VarName '=' Aclass '(FieldData.' VarName ');'])%revert to integer values2111 ProjData.(VarName)=Aclass(FieldData.(VarName));%revert to integer values 2109 2112 end 2110 2113 end
Note: See TracChangeset
for help on using the changeset viewer.