length

Version:

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)

a

Array of any dimension of any data type.

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: Not supported