source: trunk/src/griddata_uvmat.m @ 456

Last change on this file since 456 was 427, checked in by sommeria, 12 years ago

merge_proj corrected to project simulataneously velocity, vort, div...
Time reintroduced correctly
bug corrections for objects

File size: 1.0 KB
RevLine 
[7]1%'griddata_uvmat': function griddata_uvmat(vec2_X,vec2_Y,vec2_U,vec_X,vec_Y,'linear')
2%adapt the input of the matlab function griddata to the appropriate version of Matlab
[399]3function ZI = griddata_uvmat(X,Y,Z,XI,YI)
4% if ~exist('rho','var')|| isequal(rho,0)
[427]5ZI=griddata(X,Y,Z,XI,YI,'linear');
6%     txt=ver('MATLAB');
7%     Release=txt.Release;
8%     relnumb=str2num(Release(3:4));
9%     if relnumb >= 20
10%         ZI=griddata(double(X),double(Y),double(Z),double(XI),double(YI),'linear',{'QJ'});
11%     elseif relnumb >=14
12%         ZI=griddata(X,Y,Z,XI,YI,'linear',{'QJ'});
13%     else
14%         ZI=griddata(X,Y,Z,XI,YI,'linear');
15%     end
[399]16% else %smooth with thin plate spline
17%     [ZI,Z_diff]=patch_uvmat(X,Y,Z,XI,YI,rho);
18%     diff_norm=mean(Z_diff.*Z_diff)
19%     ind_good=find(abs(Z_diff)<5*diff_norm);
20%     nb_remove=numel(Z_diff)-numel(ind_good)
21%     if nb_remove>0
22%     X=X(ind_good);
23%     Y=Y(ind_good);
24%     Z=Z(ind_good);
25%     [ZI,Z_diff]=patch_uvmat(X,Y,Z,XI,YI,rho);
26%     diff_norm_new=mean(Z_diff.*Z_diff)
27%     end
28% end
Note: See TracBrowser for help on using the repository browser.