Table Of Contents

zeros

Version:
    Last Modified: January 9, 2017

    Generates an array of any dimension of zeros.

    Syntax

    c = zeros(a)
    c = zeros(a, b)
    c = zeros(a, b, ...)
    c = zeros(v)
    c = zeros(a, class)
    c = zeros(a, b, class)
    c = zeros(a, b, ..., class)
    c = zeros(v, class)

    Inputs

    a

    Number of rows in c. a is a non-negative integer. If a is zero, the function returns an empty array.

    b

    Number of columns in c. b is a non-negative integer. If b is zero, the function returns an empty array.

    ...

    Further parameters for specifying the number of elements in higher dimensions. You can replace one parameter for any dimension with an empty array, for example, reshapemx([1,2,3,4,5,6], 2, []). The array then is a placeholder for an unspecified size. MathScript uses the array size and the reshape size to calculate the unspecified size automatically.

    v

    Vector with number of rows, columns, and further dimensions. v must contain non-negative integer values.

    class

    Class of the returned array.

    Name Description
    'double'

    double

    'single'

    single

    'uint8'

    uint8

    'int8'

    int8

    'uint16'

    uint16

    'int16'

    int16

    'uint32'

    uint32

    'int32'

    int32

    'uint64'

    uint64

    'int64'

    int64

    Outputs

    c

    Array of any dimensions whose elements are all 0s. If you only specify a, c returns a square matrix of length a. If input parameters are zero, c is an empty array.

    C = zeros(3, 5)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics