imat_ctrace/minus


Purpose

Subtract coordinate traces (t1-t2).

Syntax

t1 - t2
[t,i]=minus(t1,t2)

Description

When operating on two coordinate traces, the MINUS function removes any matching coordinates of the second argument from the first. The resulting coordinate trace is sorted. If a second output argument is provided, then an index array i is returned such that t=t1(i).

Examples

>> t1=imat_ctrace('5y', '6rx', '3z', '4x-')

t1 =

    '5Y+'
    '6RX+'
    '3Z+'
    '4X-'

>> t2=imat_ctrace('4x', '3z', '2z-', '5y', '8x+')

t2 =

    '4X+'
    '3Z+'
    '2Z-'
    '5Y+'
    '8X+'

>> t2-t1

ans =

    '2Z-'
    '4X+'
    '8X+'

>> [t,i]=minus(t2,t1);

>> i

i =

     3
     1
     5

>>

See Also

imat_ctrace/plus