$LastChangedDate: 27-Juil-2011 $

# CL_intervInters

Intersection of sets of intervals

## Calling Sequence

       [ires] = CL_intervInters(i1,i2 [,i3,...,ip])

## Description

- Computes the intersection of sets of intervals.

  The intervals are gathered in different sets (i1, i2,...,ip).

  A real number x belongs to the intersection of (i1, i2,...,ip) if there exists at least one interval in each set which x belongs to.

- Notes:

  - The intervals in each set should have empty intersections (use CL_intervUnion if needed).

  - Sets of intervals may be empty: CL_intervInters(i1,[]) = [].

  - Resulting set of intervals are sorted in ascending order (first row)

## Parameters

i1:

  Set of intervals [start ; end] (2xN)

i2:

  Set of intervals [start ; end] (2xN2)

ip:

  Set of intervals [start ; end] (2xNp)

ires:

  Intesection of i1,i2...,iN (2xM)

## See also

- CL_intervUnion

- CL_intervInv

## Authors

- CNES - DCT/SB

## Examples

    i1=[ [1;3] , [5;6] , [10;12]];
    i2=[ [2;4] , [5.5;5.7] , [5.8;15]];
    ires = CL_intervInters(i1,i2);

    i1=[ [1;3] , [5;6] , [10;12]];
    i2=[ [2;4] , [5.5;5.7] , [5.8;15]];
    i3=[ [1.1;1.2] , [3.5;7] , [11;20]];
    ires = CL_intervInters(i1,i2,i3);