Changeset 651 for trunk/src/set_subdomains.m
 Timestamp:
 Jun 25, 2013, 12:48:10 AM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/set_subdomains.m
r587 r651 1 1 %'set_subdomains': sort a set of points defined by scattered coordinates in subdomains, as needed for tps interpolation 2 2 % 3 % [SubRange,Nb Sites,IndSelSubDomain] =set_subdomains(Coord,SubDomainNbPoint)3 % [SubRange,NbCentre,IndSelSubDomain] =set_subdomains(Coord,SubDomainNbPoint) 4 4 % 5 5 % OUTPUT: 6 6 % SubRange(NbCoord,NbSubdomain,2): range (min, max) of the coordinates x and y respectively, for each subdomain 7 % Nb Sites(NbSubdomain): number of source points for each subdomain7 % NbCentre(NbSubdomain): number of source points for each subdomain 8 8 % IndSelSubDomain(SubDomainNbPointMax,NbSubdomain): set of indices of the input point array 9 % selected in each subdomain, =0 beyond Nb Sitespoints9 % selected in each subdomain, =0 beyond NbCentre points 10 10 % 11 11 % INPUT: … … 13 13 % SubdomainNbPoint: estimated number of data points whished for each subdomain 14 14 15 function [SubRange,Nb Sites,IndSelSubDomain] =set_subdomains(Coord,SubDomainNbPoint)15 function [SubRange,NbCentre,IndSelSubDomain] =set_subdomains(Coord,SubDomainNbPoint) 16 16 17 17 %% adjust subdomain decomposition … … 36 36 %% default output 37 37 SubRange=zeros(NbCoord,2,NbSubDomain);%initialise the positions of subdomains 38 Nb Sites=zeros(NbSubDomain);%number of interpolated values per subdomain, =0 by default38 NbCentre=zeros(1,NbSubDomain);%number of interpolated values per subdomain, =0 by default 39 39 %Coord_tps=zeros(NbVec,NbCoord,NbSubDomain);% default positions of the tps source= initial positions of the good vectors sorted by subdomain 40 40 check_empty=zeros(1,NbSubDomain); … … 61 61 end 62 62 end 63 Nb Sites(isub)=numel(IndSel);64 IndSelSubDomain( :,isub)=IndSel;63 NbCentre(isub)=numel(IndSel); 64 IndSelSubDomain(1:numel(IndSel),isub)=IndSel; 65 65 end 66 66 … … 70 70 if ~isempty(ind_empty) 71 71 SubRange(:,:,ind_empty)=[]; 72 Nb Sites(ind_empty)=[];72 NbCentre(ind_empty)=[]; 73 73 IndSelSubDomain(:,ind_empty)=[]; 74 74 end
Note: See TracChangeset
for help on using the changeset viewer.