Changeset 434 for trunk/src/tps_coeff.m


Ignore:
Timestamp:
May 29, 2012, 11:02:08 PM (12 years ago)
Author:
sommeria
Message:

corrections in the use of get_field
test_tps introduced, to test thin plate shell functions
tps-eval_dxy corrected (bug on the calculation of the derivatives fixed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tps_coeff.m

    r362 r434  
    99% EMDX and EMDY are obtained from the function tps_eval_dxy.
    1010%------------------------------------------------------------------------
    11 % [U_smooth,U_tps]=tps_coeff(ctrs,U,rho)
     11% [U_smooth,U_tps]=tps_coeff(ctrs,U,Smoothing)
    1212%------------------------------------------------------------------------
    1313% OUPUT:
     
    1616
    1717%INPUT:
    18 % ctrs: Nxs matrix  representing the postions of the M centers, sources of the tps (s=space dimension)
    19 % U: Nx1 column vector representing the initial values of the considered scalar at the centres ctrs
    20 % rho: smoothing parameter: the result is smoother for larger rho.
     18% ctrs: Nxs matrix  representing the postions of the N centers, sources of the tps (s=space dimension)
     19% U: Nx1 column vector representing the values of the considered scalar measured at the centres ctrs
     20% Smoothing: smoothing parameter: the result is smoother for larger Smoothing.
    2121
    2222
    23 function [U_smooth,U_tps]=tps_coeff(ctrs,U,rho)
     23function [U_smooth,U_tps]=tps_coeff(ctrs,U,Smoothing)
    2424%------------------------------------------------------------------------
    25 %rho smoothing parameter
     25%Smoothing smoothing parameter
    2626% X=reshape(X,[],1);
    2727% Y=reshape(Y,[],1);
     
    3131% ctrs = [X Y];% coordinates of measurement sites, radial base functions are located at the measurement sites
    3232EM = tps_eval(ctrs,ctrs);
    33 RhoMat=rho*eye(N,N);%  rho=1/(2*omega) , omega given by fasshauer;
    34 RhoMat=[RhoMat zeros(N,3)];
     33SmoothingMat=Smoothing*eye(N,N);%  Smoothing=1/(2*omega) , omega given by fasshauer;
     34SmoothingMat=[SmoothingMat zeros(N,3)];
    3535PM=[ones(N,1) ctrs];
    36 IM=[EM+RhoMat; [PM' zeros(3,3)]];
     36IM=[EM+SmoothingMat; [PM' zeros(3,3)]];
    3737U_tps=(IM\U);
    3838U_smooth=EM *U_tps;
Note: See TracChangeset for help on using the changeset viewer.