Table Of Contents

length

Version:
    Last Modified: December 12, 2016

    Computes the length of a numeric object or string. The length of an array of any dimension is the number of the largest dimension in the array. The length of a string is the number of characters in the string.

    Syntax

    n = length(a)

    Inputs

    a

    Array of any dimension of any data type.

    Outputs

    n

    Length of a. n is a scalar.

    V = [0, 3, -4.5, 2, 4, 7]
    C = length(V)
    M = rand(1, 2, 3, 4)
    C = length(M)
    
    STR = 'abcdef'
    C = length(STR)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: DAQExpress does not support FPGA devices


    Recently Viewed Topics