Changeset 399 for trunk/src/griddata_uvmat.m
 Timestamp:
 Apr 27, 2012, 12:28:47 PM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/griddata_uvmat.m
r236 r399 1 1 %'griddata_uvmat': function griddata_uvmat(vec2_X,vec2_Y,vec2_U,vec_X,vec_Y,'linear') 2 2 %adapt the input of the matlab function griddata to the appropriate version of Matlab 3 function ZI = griddata_uvmat(X,Y,Z,XI,YI ,rho)4 if ~exist('rho','var') isequal(rho,0)3 function ZI = griddata_uvmat(X,Y,Z,XI,YI) 4 % if ~exist('rho','var') isequal(rho,0) 5 5 txt=ver('MATLAB'); 6 6 Release=txt.Release; … … 13 13 ZI=griddata(X,Y,Z,XI,YI,'linear'); 14 14 end 15 else %smooth with thin plate spline16 [ZI,Z_diff]=patch_uvmat(X,Y,Z,XI,YI,rho);17 diff_norm=mean(Z_diff.*Z_diff)18 ind_good=find(abs(Z_diff)<5*diff_norm);19 nb_remove=numel(Z_diff)numel(ind_good)20 if nb_remove>021 X=X(ind_good);22 Y=Y(ind_good);23 Z=Z(ind_good);24 [ZI,Z_diff]=patch_uvmat(X,Y,Z,XI,YI,rho);25 diff_norm_new=mean(Z_diff.*Z_diff)26 end27 end15 % else %smooth with thin plate spline 16 % [ZI,Z_diff]=patch_uvmat(X,Y,Z,XI,YI,rho); 17 % diff_norm=mean(Z_diff.*Z_diff) 18 % ind_good=find(abs(Z_diff)<5*diff_norm); 19 % nb_remove=numel(Z_diff)numel(ind_good) 20 % if nb_remove>0 21 % X=X(ind_good); 22 % Y=Y(ind_good); 23 % Z=Z(ind_good); 24 % [ZI,Z_diff]=patch_uvmat(X,Y,Z,XI,YI,rho); 25 % diff_norm_new=mean(Z_diff.*Z_diff) 26 % end 27 % end
Note: See TracChangeset
for help on using the changeset viewer.