imat_ctrace/double


Purpose

Convert coordinate trace into Nx2 numeric array.

Syntax

x=double(t)

Description

When given an imat_ctrace object, the DOUBLE function converts a coordinate trace t into an nx2 numeric array. The first column of the result contains the node number, and the second column of the result contains a numeric code representing the coordinate direction:

Numeric code Direction Numeric code Direction
1 X+ -1 X-
2 Y+ -2 Y-
3 Z+ -3 Z-
4 RX+ -4 RX-
5 RY+ -5 RY-
6 RZ+ -6 RZ-
0 any other    


A numeric array of this type can be used to create a coordinate trace by passing it to the imat_ctrace function.

Examples

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

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

>> double(t)

ans =
     5     2
     6     4
     3     3
     4    -1

>>

See Also

imat_ctrace/imat_ctrace, imat_ctrace/node, imat_ctrace/dir, imat_dir2num, imat_num2dir