$LastChangedDate: 27-Juil-2011 $

# CL_intervUnion

Union of sets of intervals

## Calling Sequence

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

## Description

- Computes the union of sets of intervals.

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

  A real number x belongs to the union of (i1, i2,...,ip) if it belongs to at least one interval in one of the sets.

- Notes:

  - Only one set may be given. The result is then the union of the intervals that belong to the set.

  - Sets of intervals may be empty: CL_intervUnion(i1,[]) = CL_intervUnion(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:

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

## See also

- CL_intervInters

- CL_intervInv

## Authors

- CNES - DCT/SB

## Examples

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