dircos.m¶
Basic Information¶
SYNTAX:
dir_cos= dircos(x,y,z,origin);
PURPOSE:
Generate direction cosines from line segment defined by [x,y,z] - origin
INPUT:
x,y,z= end points of line segment
origin= vector [3] defining start of line segment
Note: if not present assumes [0,0,0]
OUTPUT
dir_cos= row vectors of length 3 which contains the
direction cosine for each entry in x,y,z
NOTE: x,y,z can be matrix but output is matrix [n,3] where n=prod(size(x))