Changeset 389 for trunk/src/filter_tps.m


Ignore:
Timestamp:
Apr 8, 2012, 11:11:38 PM (12 years ago)
Author:
sommeria
Message:

several bugs corrected: object managing, tps filter...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/filter_tps.m

    r387 r389  
    2828W_smooth=[];
    2929NbCoord=size(Coord,2);
    30 NbSubDomain=ceil(nbvec/SubDomain);
     30NbSubDomain=nbvec/SubDomain;
    3131MinCoord=min(Coord,[],1);
    32 % MinY=min(Y,);
    3332MaxCoord=max(Coord,[],1);
    34 % MaxY=max(Y);
    3533Range=MaxCoord-MinCoord;
    36 % RangY=MaxY-MinY;
    3734AspectRatio=Range(2)/Range(1);
    3835NbSubDomainX=max(floor(sqrt(NbSubDomain/AspectRatio)),1);
     
    7572            SubRange(:,1,isub)=SubRange(:,1,isub)-Siz'/4;
    7673            SubRange(:,2,isub)=SubRange(:,2,isub)+Siz'/4;
    77 %             SubRangy(isub,1)=SubRangy(isub,1)-Siz(2)/4;
    78 %             SubRangy(isub,2)=SubRangy(isub,2)+Siz(2)/4;
    79         else
    80            
     74        else         
    8175            [U_smooth_sub,U_tps_sub]=tps_coeff(Coord(ind_sel,:),U(ind_sel),rho);
    8276            [V_smooth_sub,V_tps_sub]=tps_coeff(Coord(ind_sel,:),V(ind_sel),rho);
     
    109103                [V_smooth_sub,V_tps_sub]=tps_coeff(Coord(ind_sel(ind_ind_sel),:),V(ind_sel(ind_ind_sel)),rho);
    110104                U_smooth(ind_sel(ind_ind_sel))=U_smooth(ind_sel(ind_ind_sel))+U_smooth_sub;
    111                 V_smooth(ind_sel(ind_ind_sel))=V_smooth(ind_sel(ind_ind_sel))+V_smooth_sub;
     105                V_smooth(ind_sel(ind_ind_sel))=V_smooth(ind_sel(ind_ind_sel))+V_smooth_sub;   
    112106                NbSites(isub)=numel(ind_ind_sel);
    113                 %Indices_tps(1:NbSites(isub),isub)=ind_sel(ind_ind_sel);
    114107                Coord_tps(1:NbSites(isub),:,isub)=Coord(ind_sel(ind_ind_sel),:);
    115 %                 Y_tps(1:NbSites(isub),:,isub)=Coord(ind_sel(ind_ind_sel),2);
    116108                U_tps(1:NbSites(isub)+3,isub)=U_tps_sub;
    117109                V_tps(1:NbSites(isub)+3,isub)=V_tps_sub;
     
    127119if ~isempty(ind_empty)
    128120    SubRange(:,:,ind_empty)=[];
    129 %     SubRangy(ind_empty,:)=[];
    130 %     Indices_tps(:,ind_empty)=[];
    131121    Coord_tps(:,:,ind_empty)=[];
    132 %     Y_tps(:,ind_empty)=[];
    133122    U_tps(:,ind_empty)=[];
    134123    V_tps(:,ind_empty)=[];
Note: See TracChangeset for help on using the changeset viewer.