Main Content

3x3 Cross Product

Calculate cross product of two 3-by-1 vectors

  • Library:
  • Aerospace Blockset / Utilities / Math Operations

  • 3x3 Cross Product block

Description

The 3x3 Cross Product block computes cross (or vector) product of two vectors, A and B. The block generates a third vector, C, in a direction normal to the plane containing A and B, with magnitude equal to the product of the lengths of A and B multiplied by the sine of the angle between them. The direction of C follows the right-hand rule in turning from A to B. For related equations, see Algorithms.

Ports

Input

expand all

First cross product input, specified as a vector.

Example: [10 2 3]

Data Types: double

Second cross product input, specified as a vector.

Example: [10 2 3]

Data Types: double

Output

expand all

Cross product, output as a vector.

Data Types: double

Algorithms

The equations used to calculate A, B, and C are:

A=a1i+a2j+a3kB=b1i+b2j+b3kC=A×B=|ijka1a2a3b1b2b3|=(a2b3a3b2)i+(a3b1a1b3)j+(a1b2a2b1)k

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced before R2006a