home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.univie.ac.at!blekul11!frmop11!dearn!esoc!estec!pmortens
- Organisation: European Space Technology Centre (E.S.T.E.C)
- Date: Saturday, 23 Jan 1993 19:07:44 CET
- From: <PMORTENS@ESTEC.BITNET>
- Message-ID: <93023.190744PMORTENS@ESTEC.BITNET>
- Newsgroups: comp.soft-sys.matlab
- Subject: SOURCE: vector cross product
- Lines: 29
-
- .gf cross1 m
- Maybe this is trivial but here it is: a function returning the cross
- product of two vectors.
-
-
- function c=CROSS(a,b);
- %****************************************************************************
- %* FORMAT : c=CROSS(a,b); *
- %* This function returns the crossproduct of a and b. The returned vector *
- %* is a column vector *
- %****************************************************************************
-
- %****************************************************************************
- %* European Space Research and Technology Centre (ESTEC) *
- %* Earth Observation Preparatory Programme Division (EOPP) *
- %* Solid Earth Section (OPS) *
- %* Peter Mortensen *
- %* *
- %* Programme for optimal signal estimation, ARISTOTELES. *
- %* File: CROSS.M VRS: 1.0 *
- %* *
- %* CREATED : PM 24.04.1992 *
- %* UPDATED : *
- %* *
- %* This function returns the crossproduct of its 2 argument vectors *
- %* M-files in use: None *
- %****************************************************************************
- c=[ a(2)*b(3)-b(2)*a(3) ; -a(1)*b(3)+b(1)*a(3) ; a(1)*b(2)-b(1)*a(2) ];
-
-