Changeset 387 for trunk/src/filter_tps.m
- Timestamp:
- Apr 4, 2012, 3:31:30 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/filter_tps.m
r382 r387 73 73 % if too few selected vectors, increase the subrange for next iteration 74 74 elseif numel(ind_sel)<SubDomain/4 && ~isequal( ind_sel,ind_sel_previous); 75 SubRange(:,1,isub)=SubRange(:,1,isub)-Siz /4;76 SubRange(:,2,isub)=SubRange(:,2,isub)+Siz /4;75 SubRange(:,1,isub)=SubRange(:,1,isub)-Siz'/4; 76 SubRange(:,2,isub)=SubRange(:,2,isub)+Siz'/4; 77 77 % SubRangy(isub,1)=SubRangy(isub,1)-Siz(2)/4; 78 78 % SubRangy(isub,2)=SubRangy(isub,2)+Siz(2)/4; … … 89 89 ind_ind_sel=find(FF(ind_sel)==0); % select the indices of ind_sel corresponding to the remaining vectors 90 90 end 91 % no value exceeds threshold, the result is recorded91 % if no value exceeds threshold, the result is recorded 92 92 if isequal(numel(ind_ind_sel),numel(ind_sel)) 93 93 U_smooth(ind_sel)=U_smooth(ind_sel)+U_smooth_sub; 94 94 V_smooth(ind_sel)=V_smooth(ind_sel)+V_smooth_sub; 95 95 NbSites(isub)=numel(ind_sel); 96 % Indices_tps(1:NbSites(isub),isub)=ind_sel;97 96 Coord_tps(1:NbSites(isub),:,isub)=Coord(ind_sel,:); 98 % Y_tps(1:NbSites(isub),:,isub)=Coord(ind_sel,2);99 97 U_tps(1:NbSites(isub)+3,isub)=U_tps_sub; 100 98 V_tps(1:NbSites(isub)+3,isub)=V_tps_sub; 101 99 nb_select(ind_sel)=nb_select(ind_sel)+1; 102 100 display('good') 103 101 break 104 %too few selected vectors, increase the subrange for next iteration102 % if too few selected vectors, increase the subrange for next iteration 105 103 elseif numel(ind_ind_sel)<SubDomain/4 && ~isequal( ind_sel,ind_sel_previous); 106 SubRange(:,1,isub)=SubRange(:,1,isub)-Siz/4; 107 SubRange(:,2,isub)=SubRange(:,2,isub)+Siz/4; 108 % SubRange(2,isub,1)=SubRangy(2,isub,1)-Siz(2)/4; 109 % SubRange(2,isub,2)=SubRangy(2,isub,2)+Siz(2)/4; 110 % display('fewsmooth') 111 % interpolation-smoothing is done again with the selected vectors 104 SubRange(:,1,isub)=SubRange(:,1,isub)-Siz'/4; 105 SubRange(:,2,isub)=SubRange(:,2,isub)+Siz'/4; 106 % else interpolation-smoothing is done again with the selected vectors 112 107 else 113 [U_smooth_sub,U_tps_sub]=tps_coeff(Coord(ind_sel(ind_ind_sel) ),U(ind_sel(ind_ind_sel)),rho);114 [V_smooth_sub,V_tps_sub]=tps_coeff(Coord(ind_sel(ind_ind_sel) ),V(ind_sel(ind_ind_sel)),rho);108 [U_smooth_sub,U_tps_sub]=tps_coeff(Coord(ind_sel(ind_ind_sel),:),U(ind_sel(ind_ind_sel)),rho); 109 [V_smooth_sub,V_tps_sub]=tps_coeff(Coord(ind_sel(ind_ind_sel),:),V(ind_sel(ind_ind_sel)),rho); 115 110 U_smooth(ind_sel(ind_ind_sel))=U_smooth(ind_sel(ind_ind_sel))+U_smooth_sub; 116 111 V_smooth(ind_sel(ind_ind_sel))=V_smooth(ind_sel(ind_ind_sel))+V_smooth_sub;
Note: See TracChangeset
for help on using the changeset viewer.