Changeset 476 for trunk/src/filter_tps.m


Ignore:
Timestamp:
Jun 25, 2012, 10:50:51 AM (12 years ago)
Author:
sommeria
Message:

bugs corrected +
* filter parameter multiplied by 1000 in filter_tps*

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/filter_tps.m

    r389 r476  
     1%'filter_tps': find the thin plate spline coefficients for interpolation-smoothing
    12%------------------------------------------------------------------------
    2 % patch function
     3% [SubRange,NbSites,Coord_tps,U_tps,V_tps,W_tps,U_smooth,V_smooth,W_smooth,FF] =filter_tps(Coord,U,V,W,SubDomain,Rho,Threshold)
     4%
    35% OUTPUT:
    46% SubRange(NbCoord,NbSubdomain,2): range (min, max) of the coordiantes x and y respectively, for each subdomain
     
    1012%
    1113% INPUT:
    12 % X, Y: set of coordinates of the initial data
     14% coord=[X Y]: matrix whose first column is the x coordinates of the initial data, the second column the y coordiantes
    1315% U,V: set of velocity components of the initial data
    1416% Rho: smoothing parameter
     
    1618% Subdomain: estimated number of data points in each subdomain
    1719
    18 %function [SubRangx,SubRangy,nbpoints,FF,U_smooth,V_smooth,X_tps,Y_tps,U_tps,V_tps,Indices_tps] =filter_tps(Coord,U,V,W,SubDomain,Rho,Threshold)
    1920function [SubRange,NbSites,Coord_tps,U_tps,V_tps,W_tps,U_smooth,V_smooth,W_smooth,FF] =filter_tps(Coord,U,V,W,SubDomain,Rho,Threshold)
    2021%subdomain decomposition
    2122warning off
    22 % U=reshape(U,[],1);
    23 % V=reshape(V,[],1);
    24 % X=reshape(X,[],1);
    25 % Y=reshape(Y,[],1);
    2623nbvec=size(Coord,1);
    2724W_tps=[];%default
     
    4340CentreY=reshape(CentreY,1,[]);% Y positions of subdomain centres
    4441CentreX=reshape(CentreX,1,[]);% X positions of subdomain centres
    45 rho=Siz(1)*Siz(2)*Rho/1000000;%optimum rho increase as the area of the subdomain (division by 10^6 to reach good values with the default GUI input)
     42rho=Siz(1)*Siz(2)*Rho/1000;%optimum rho increase as the area of the subdomain (division by 10^6 to reach good values with the default GUI input)
    4643U_tps_sub=zeros(nbvec,NbSubDomain);%default spline
    4744V_tps_sub=zeros(nbvec,NbSubDomain);%default spline
Note: See TracChangeset for help on using the changeset viewer.