主要内容

Cross Product

R2026b

(Removed) Cross product of two 3-D vectors

Cross Product has been removed. For more information, see Version History.

  • Cross Product block

Libraries:
Simulink 3D Animation / Utilities

Description

Return the cross product–or vector product–of two 3-by-1 vectors. Each input is a vector of the form a1i^+a2j^+a3k^ where i, j, and k are unit vectors parallel to the x, y, and z coordinate axes. The output vector y→=a→×b→ is a 3 element vector orthogonal to the input vectors a→ and b→.

Ports

Input

expand all

Input vector a→, where the elements represent the magnitude of the vector parallel to the x, y, and z coordinate axes.

Data Types: double

Input vector b→, where the elements represent the magnitude of the vector parallel to the x, y, and z coordinate axes.

Data Types: double

Output

expand all

Output vector y→=a→×b→, which is orthogonal to a→ and b→.

Data Types: double

Programmatic Use: Add Block

To add the block programmatically, use the add_block function with one of these library block paths as the source.

"vrlib/Utilities/Cross Product"

Example: add_block("vrlib/Utilities/Cross Product","myModel/myBlock",MakeNameUnique="on")

Extended Capabilities

expand all

Version History

Introduced in R2006a

expand all