$LastChangedDate: 27-Juil-2011 $

# CL_intervInv

Difference of sets of intervals

## Calling Sequence

       [ires] = CL_intervInv(i1,i2)

## Description

- Computes the difference of sets of intervals.

  The intervals are gathered in two sets (i1 and i2).

  A real number x belongs to the difference of i1 and i2 if it belongs to an interval from i1, and does not belong to any interval from i2.

- Notes:

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

  - Sets of intervals may be empty. CL_intervInv(i1,[]) = i1. CL_intervInv([],i2) = [].

## Parameters

i1:

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

i2:

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

ires:

  Difference of i1 and i2 (i1 minus i2) (2xM)

## See also

- CL_intervInters

- CL_intervUnion

## Authors

- CNES - DCT/SB

## Examples

    i1=[ 0 ; 20 ];
    i2=[ [2;4] , [5.5;5.7] , [6.6;15]];
    ires = CL_intervInv(i1,i2);