Ignore:
Timestamp:
Jun 25, 2013, 12:48:10 AM (11 years ago)
Author:
sommeria
Message:

various bugs corrected. Introduction of campaign lists in Open menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/set_subdomains.m

    r587 r651  
    11%'set_subdomains': sort a set of points defined by scattered coordinates in subdomains, as needed for tps interpolation
    22%------------------------------------------------------------------------
    3 % [SubRange,NbSites,IndSelSubDomain] =set_subdomains(Coord,SubDomainNbPoint)
     3% [SubRange,NbCentre,IndSelSubDomain] =set_subdomains(Coord,SubDomainNbPoint)
    44%
    55% OUTPUT:
    66% SubRange(NbCoord,NbSubdomain,2): range (min, max) of the coordinates x and y respectively, for each subdomain
    7 % NbSites(NbSubdomain): number of source points for each subdomain
     7% NbCentre(NbSubdomain): number of source points for each subdomain
    88% IndSelSubDomain(SubDomainNbPointMax,NbSubdomain): set of indices of the input point array
    9 % selected in each subdomain, =0 beyond NbSites points
     9% selected in each subdomain, =0 beyond NbCentre points
    1010%
    1111% INPUT:
     
    1313% SubdomainNbPoint: estimated number of data points whished for each subdomain
    1414
    15 function [SubRange,NbSites,IndSelSubDomain] =set_subdomains(Coord,SubDomainNbPoint)
     15function [SubRange,NbCentre,IndSelSubDomain] =set_subdomains(Coord,SubDomainNbPoint)
    1616
    1717%% adjust subdomain decomposition
     
    3636%% default output
    3737SubRange=zeros(NbCoord,2,NbSubDomain);%initialise the positions of subdomains
    38 NbSites=zeros(NbSubDomain);%number of interpolated values per subdomain, =0 by default
     38NbCentre=zeros(1,NbSubDomain);%number of interpolated values per subdomain, =0 by default
    3939%Coord_tps=zeros(NbVec,NbCoord,NbSubDomain);% default positions of the tps source= initial positions of the good vectors sorted by subdomain
    4040check_empty=zeros(1,NbSubDomain);
     
    6161        end
    6262    end
    63     NbSites(isub)=numel(IndSel);
    64     IndSelSubDomain(:,isub)=IndSel;
     63    NbCentre(isub)=numel(IndSel);
     64    IndSelSubDomain(1:numel(IndSel),isub)=IndSel;
    6565end
    6666
     
    7070if ~isempty(ind_empty)
    7171    SubRange(:,:,ind_empty)=[];
    72     NbSites(ind_empty)=[];
     72    NbCentre(ind_empty)=[];
    7373    IndSelSubDomain(:,ind_empty)=[];
    7474end
Note: See TracChangeset for help on using the changeset viewer.