From 12:00 PM - 8:00 PM CST on Thursday, October 18, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Table Of Contents

cross

Version:
    Last Modified: January 9, 2017

    Computes the cross product of two arrays.

    Syntax

    c = cross(a, b)
    c = cross(a, b, dim)

    Inputs

    a

    Array of any dimension.

    b

    Array. b must be the same size as a.

    dim

    Dimension in which MathScript computes the cross product. The dim-th dimension of a and b must contain exactly 3 elements. dim can be in a range of 1 to the maximum supported array dimension (32). If you do not specify dim, the function works on the first dimension whose size is 3.

    Outputs

    c

    Cross product of a and b. c is an array of the same size as a and b.

    A = [1, 2, 3]
    B = [0, -3, 2]
    C = cross(A, B)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics