Changeset 434 for trunk/src/tps_coeff.m
- Timestamp:
- May 29, 2012, 11:02:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tps_coeff.m
r362 r434 9 9 % EMDX and EMDY are obtained from the function tps_eval_dxy. 10 10 %------------------------------------------------------------------------ 11 % [U_smooth,U_tps]=tps_coeff(ctrs,U, rho)11 % [U_smooth,U_tps]=tps_coeff(ctrs,U,Smoothing) 12 12 %------------------------------------------------------------------------ 13 13 % OUPUT: … … 16 16 17 17 %INPUT: 18 % ctrs: Nxs matrix representing the postions of the Mcenters, sources of the tps (s=space dimension)19 % U: Nx1 column vector representing the initial values of the considered scalarat the centres ctrs20 % 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. 21 21 22 22 23 function [U_smooth,U_tps]=tps_coeff(ctrs,U, rho)23 function [U_smooth,U_tps]=tps_coeff(ctrs,U,Smoothing) 24 24 %------------------------------------------------------------------------ 25 % rhosmoothing parameter25 %Smoothing smoothing parameter 26 26 % X=reshape(X,[],1); 27 27 % Y=reshape(Y,[],1); … … 31 31 % ctrs = [X Y];% coordinates of measurement sites, radial base functions are located at the measurement sites 32 32 EM = tps_eval(ctrs,ctrs); 33 RhoMat=rho*eye(N,N);% rho=1/(2*omega) , omega given by fasshauer;34 RhoMat=[RhoMat zeros(N,3)];33 SmoothingMat=Smoothing*eye(N,N);% Smoothing=1/(2*omega) , omega given by fasshauer; 34 SmoothingMat=[SmoothingMat zeros(N,3)]; 35 35 PM=[ones(N,1) ctrs]; 36 IM=[EM+ RhoMat; [PM' zeros(3,3)]];36 IM=[EM+SmoothingMat; [PM' zeros(3,3)]]; 37 37 U_tps=(IM\U); 38 38 U_smooth=EM *U_tps;
Note: See TracChangeset
for help on using the changeset viewer.