Документация
Длина самого большого измерения массива
Синтаксис
Описание
L = length( X ) возвращает длину самого большого измерения массива в X . Для векторов длина является просто числом элементов. Для массивов с большим количеством размерностей длиной является max(size(X)) . Длина пустого массива является нулем.
Примеры
Количество векторных элементов
Найдите длину однородно расположенного с интервалами вектора в интервале [5,10] .
Длина прямоугольной матрицы
Найдите длину 3 7 матрица нулей.
Массив строк
Создайте массив строк и вычислите его длину, которая является числом элементов в каждой строке.
Длина полей структуры
Создайте структуру с полями для Day и Month . Используйте structfun функция, чтобы применить length к каждому полю.
Входные параметры
X — Входной массив
скаляр | вектор | матрица | многомерный массив
Входной массив, заданный как скалярный, векторный, матричный или многомерный массив.
Поддержка комплексного числа: Да
Советы
Чтобы найти количество символов в строке или векторе символов, используйте strlength функция.
length не работает с таблицами. Чтобы исследовать размерности таблицы, используйте height width , или size функции.
Расширенные возможности
«Высокие» массивы
Осуществление вычислений с массивами, которые содержат больше строк, чем помещается в памяти.
Генерация кода C/C++
Генерация кода C и C++ с помощью MATLAB® Coder™.
Генерация кода графического процессора
Сгенерируйте код CUDA® для NVIDIA® графические процессоры с помощью GPU Coder™.
Генерация HDL-кода
Сгенерируйте Verilog и код VHDL для FPGA и проекты ASIC с помощью HDL Coder™.
Основанная на потоке среда
Запустите код в фоновом режиме с помощью MATLAB® backgroundPool или ускорьте код с Parallel Computing Toolbox™ ThreadPool .
Эта функция полностью поддерживает основанные на потоке среды. Для получения дополнительной информации смотрите функции MATLAB Запуска в Основанной на потоке Среде.
Массивы графического процессора
Ускорьте код путем работы графического процессора (GPU) с помощью Parallel Computing Toolbox™.
Эта функция полностью поддерживает массивы графического процессора. Для получения дополнительной информации смотрите функции MATLAB Запуска на графическом процессоре (Parallel Computing Toolbox) .
Распределенные массивы
Большие массивы раздела через объединенную память о вашем кластере с помощью Parallel Computing Toolbox™.
Эта функция полностью поддерживает распределенные массивы. Для получения дополнительной информации смотрите функции MATLAB Запуска с Распределенными Массивами (Parallel Computing Toolbox) .
Смотрите также
Открытый пример
У вас есть модифицированная версия этого примера. Вы хотите открыть этот пример со своими редактированиями?
Документация MATLAB
Поддержка
© 1994-2021 The MathWorks, Inc.
1. Если смысл перевода понятен, то лучше оставьте как есть и не придирайтесь к словам, синонимам и тому подобному. О вкусах не спорим.
2. Не дополняйте перевод комментариями “от себя”. В исправлении не должно появляться дополнительных смыслов и комментариев, отсутствующих в оригинале. Такие правки не получится интегрировать в алгоритме автоматического перевода.
3. Сохраняйте структуру оригинального текста — например, не разбивайте одно предложение на два.
4. Не имеет смысла однотипное исправление перевода какого-то термина во всех предложениях. Исправляйте только в одном месте. Когда Вашу правку одобрят, это исправление будет алгоритмически распространено и на другие части документации.
5. По иным вопросам, например если надо исправить заблокированное для перевода слово, обратитесь к редакторам через форму технической поддержки.
Источник статьи: http://docs.exponenta.ru/matlab/ref/length.html
length
Length of largest array dimension
Syntax
Description
L = length( X ) returns the length of the largest array dimension in X . For vectors, the length is simply the number of elements. For arrays with more dimensions, the length is max(size(X)) . The length of an empty array is zero.
Examples
Number of Vector Elements
Find the length of a uniformly spaced vector in the interval [5,10] .
Length of Rectangular Matrix
Find the length of a 3-by-7 matrix of zeros.
String Array
Create a string array and compute its length, which is the number of elements in each row.
Length of Structure Fields
Create a structure with fields for Day and Month . Use the structfun function to apply length to each field.
Input Arguments
X — Input array
scalar | vector | matrix | multidimensional array
Input array, specified as a scalar, vector, matrix, or multidimensional array.
Complex Number Support: Yes
To find the number of characters in a string or character vector, use the strlength function.
length does not operate on tables. To examine the dimensions of a table, use the height , width , or size functions.
Extended Capabilities
Tall Arrays
Calculate with arrays that have more rows than fit in memory.
This function fully supports tall arrays. For more information, see Tall Arrays.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
HDL Code Generation
Generate Verilog and VHDL code for FPGA and ASIC designs using HDL Coder™.
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool .
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox) .
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox) .
Источник статьи: http://www.mathworks.com/help/matlab/ref/length.html
length
Length of largest array dimension
Syntax
Description
L = length( X ) returns the length of the largest array dimension in X . For vectors, the length is simply the number of elements. For arrays with more dimensions, the length is max(size(X)) . The length of an empty array is zero.
Examples
Number of Vector Elements
Find the length of a uniformly spaced vector in the interval [5,10] .
Length of Rectangular Matrix
Find the length of a 3-by-7 matrix of zeros.
String Array
Create a string array and compute its length, which is the number of elements in each row.
Length of Structure Fields
Create a structure with fields for Day and Month . Use the structfun function to apply length to each field.
Input Arguments
X — Input array
scalar | vector | matrix | multidimensional array
Input array, specified as a scalar, vector, matrix, or multidimensional array.
Complex Number Support: Yes
To find the number of characters in a string or character vector, use the strlength function.
length does not operate on tables. To examine the dimensions of a table, use the height , width , or size functions.
Extended Capabilities
Tall Arrays
Calculate with arrays that have more rows than fit in memory.
This function fully supports tall arrays. For more information, see Tall Arrays.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
HDL Code Generation
Generate Verilog and VHDL code for FPGA and ASIC designs using HDL Coder™.
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool .
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox) .
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox) .
Источник статьи: http://uk.mathworks.com/help/matlab/ref/length.html
Документация
Длина самого большого измерения массива
Синтаксис
Описание
L = length( X ) возвращает длину самого большого измерения массива в X . Для векторов длина является просто числом элементов. Для массивов с большим количеством размерностей длиной является max(size(X)) . Длина пустого массива является нулем.
Примеры
Количество векторных элементов
Найдите длину однородно расположенного с интервалами вектора в интервале [5,10] .
Длина прямоугольной матрицы
Найдите длину 3 7 матрица нулей.
Массив строк
Создайте массив строк и вычислите его длину, которая является числом элементов в каждой строке.
Длина полей структуры
Создайте структуру с полями для Day и Month . Используйте structfun функция, чтобы применить length к каждому полю.
Входные параметры
X — Входной массив
скаляр | вектор | матрица | многомерный массив
Входной массив, заданный как скалярный, векторный, матричный или многомерный массив.
Поддержка комплексного числа: Да
Советы
Чтобы найти количество символов в строке или векторе символов, используйте strlength функция.
length не работает с таблицами. Чтобы исследовать размерности таблицы, используйте height width , или size функции.
Расширенные возможности
«Высокие» массивы
Осуществление вычислений с массивами, которые содержат больше строк, чем помещается в памяти.
Генерация кода C/C++
Генерация кода C и C++ с помощью MATLAB® Coder™.
Генерация кода графического процессора
Сгенерируйте код CUDA® для NVIDIA® графические процессоры с помощью GPU Coder™.
Генерация HDL-кода
Сгенерируйте Verilog и код VHDL для FPGA и проекты ASIC с помощью HDL Coder™.
Основанная на потоке среда
Запустите код в фоновом режиме с помощью MATLAB® backgroundPool или ускорьте код с Parallel Computing Toolbox™ ThreadPool .
Эта функция полностью поддерживает основанные на потоке среды. Для получения дополнительной информации смотрите функции MATLAB Запуска в Основанной на потоке Среде.
Массивы графического процессора
Ускорьте код путем работы графического процессора (GPU) с помощью Parallel Computing Toolbox™.
Эта функция полностью поддерживает массивы графического процессора. Для получения дополнительной информации смотрите функции MATLAB Запуска на графическом процессоре (Parallel Computing Toolbox) .
Распределенные массивы
Большие массивы раздела через объединенную память о вашем кластере с помощью Parallel Computing Toolbox™.
Эта функция полностью поддерживает распределенные массивы. Для получения дополнительной информации смотрите функции MATLAB Запуска с Распределенными Массивами (Parallel Computing Toolbox) .
Смотрите также
Открытый пример
У вас есть модифицированная версия этого примера. Вы хотите открыть этот пример со своими редактированиями?
Документация MATLAB
Поддержка
© 1994-2021 The MathWorks, Inc.
1. Если смысл перевода понятен, то лучше оставьте как есть и не придирайтесь к словам, синонимам и тому подобному. О вкусах не спорим.
2. Не дополняйте перевод комментариями “от себя”. В исправлении не должно появляться дополнительных смыслов и комментариев, отсутствующих в оригинале. Такие правки не получится интегрировать в алгоритме автоматического перевода.
3. Сохраняйте структуру оригинального текста — например, не разбивайте одно предложение на два.
4. Не имеет смысла однотипное исправление перевода какого-то термина во всех предложениях. Исправляйте только в одном месте. Когда Вашу правку одобрят, это исправление будет алгоритмически распространено и на другие части документации.
5. По иным вопросам, например если надо исправить заблокированное для перевода слово, обратитесь к редакторам через форму технической поддержки.
Источник статьи: http://docs.exponenta.ru/matlab/ref/length.html?searchHighlight=lenght
length
Length of largest array dimension
Syntax
Description
L = length( X ) returns the length of the largest array dimension in X . For vectors, the length is simply the number of elements. For arrays with more dimensions, the length is max(size(X)) . The length of an empty array is zero.
Examples
Number of Vector Elements
Find the length of a uniformly spaced vector in the interval [5,10] .
Length of Rectangular Matrix
Find the length of a 3-by-7 matrix of zeros.
String Array
Create a string array and compute its length, which is the number of elements in each row.
Length of Structure Fields
Create a structure with fields for Day and Month . Use the structfun function to apply length to each field.
Input Arguments
X — Input array
scalar | vector | matrix | multidimensional array
Input array, specified as a scalar, vector, matrix, or multidimensional array.
Complex Number Support: Yes
To find the number of characters in a string or character vector, use the strlength function.
length does not operate on tables. To examine the dimensions of a table, use the height , width , or size functions.
Extended Capabilities
Tall Arrays
Calculate with arrays that have more rows than fit in memory.
This function fully supports tall arrays. For more information, see Tall Arrays.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
HDL Code Generation
Generate Verilog and VHDL code for FPGA and ASIC designs using HDL Coder™.
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool .
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox) .
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox) .
Источник статьи: http://ch.mathworks.com/help/matlab/ref/length.html
length
Length of largest array dimension
Syntax
Description
L = length( X ) returns the length of the largest array dimension in X . For vectors, the length is simply the number of elements. For arrays with more dimensions, the length is max(size(X)) . The length of an empty array is zero.
Examples
Number of Vector Elements
Find the length of a uniformly spaced vector in the interval [5,10] .
Length of Rectangular Matrix
Find the length of a 3-by-7 matrix of zeros.
String Array
Create a string array and compute its length, which is the number of elements in each row.
Length of Structure Fields
Create a structure with fields for Day and Month . Use the structfun function to apply length to each field.
Input Arguments
X — Input array
scalar | vector | matrix | multidimensional array
Input array, specified as a scalar, vector, matrix, or multidimensional array.
Complex Number Support: Yes
To find the number of characters in a string or character vector, use the strlength function.
length does not operate on tables. To examine the dimensions of a table, use the height , width , or size functions.
Extended Capabilities
Tall Arrays
Calculate with arrays that have more rows than fit in memory.
This function fully supports tall arrays. For more information, see Tall Arrays.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
HDL Code Generation
Generate Verilog and VHDL code for FPGA and ASIC designs using HDL Coder™.
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool .
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox) .
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox) .
Источник статьи: http://se.mathworks.com/help/matlab/ref/length.html
length
Length of largest array dimension
Syntax
Description
L = length( X ) returns the length of the largest array dimension in X . For vectors, the length is simply the number of elements. For arrays with more dimensions, the length is max(size(X)) . The length of an empty array is zero.
Examples
Number of Vector Elements
Find the length of a uniformly spaced vector in the interval [5,10] .
Length of Rectangular Matrix
Find the length of a 3-by-7 matrix of zeros.
String Array
Create a string array and compute its length, which is the number of elements in each row.
Length of Structure Fields
Create a structure with fields for Day and Month . Use the structfun function to apply length to each field.
Input Arguments
X — Input array
scalar | vector | matrix | multidimensional array
Input array, specified as a scalar, vector, matrix, or multidimensional array.
Complex Number Support: Yes
To find the number of characters in a string or character vector, use the strlength function.
length does not operate on tables. To examine the dimensions of a table, use the height , width , or size functions.
Extended Capabilities
Tall Arrays
Calculate with arrays that have more rows than fit in memory.
This function fully supports tall arrays. For more information, see Tall Arrays.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
HDL Code Generation
Generate Verilog and VHDL code for FPGA and ASIC designs using HDL Coder™.
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool .
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox) .
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox) .
Источник статьи: http://nl.mathworks.com/help/matlab/ref/length.html
Документация
Длина самого большого измерения массива
Синтаксис
Описание
L = length( X ) возвращает длину самого большого измерения массива в X . Для векторов длина является просто числом элементов. Для массивов с большим количеством размерностей длиной является max(size(X)) . Длина пустого массива является нулем.
Примеры
Количество векторных элементов
Найдите длину однородно расположенного с интервалами вектора в интервале [5,10] .
Длина прямоугольной матрицы
Найдите длину 3 7 матрица нулей.
Массив строк
Создайте массив строк и вычислите его длину, которая является числом элементов в каждой строке.
Длина полей структуры
Создайте структуру с полями для Day и Month . Используйте structfun функция, чтобы применить length к каждому полю.
Входные параметры
X — Входной массив
скаляр | вектор | матрица | многомерный массив
Входной массив, заданный как скалярный, векторный, матричный или многомерный массив.
Поддержка комплексного числа: Да
Советы
Чтобы найти количество символов в строке или векторе символов, используйте strlength функция.
length не работает с таблицами. Чтобы исследовать размерности таблицы, используйте height width , или size функции.
Расширенные возможности
«Высокие» массивы
Осуществление вычислений с массивами, которые содержат больше строк, чем помещается в памяти.
Генерация кода C/C++
Генерация кода C и C++ с помощью MATLAB® Coder™.
Генерация кода графического процессора
Сгенерируйте код CUDA® для NVIDIA® графические процессоры с помощью GPU Coder™.
Массивы графического процессора
Ускорьте код путем работы графического процессора (GPU) с помощью Parallel Computing Toolbox™.
Эта функция полностью поддерживает массивы графического процессора. Для получения дополнительной информации смотрите функции MATLAB Запуска на графическом процессоре (Parallel Computing Toolbox).
Распределенные массивы
Большие массивы раздела через объединенную память о вашем кластере с помощью Parallel Computing Toolbox™.
Эта функция полностью поддерживает распределенные массивы. Для получения дополнительной информации смотрите функции MATLAB Запуска с Распределенными Массивами (Parallel Computing Toolbox).
Смотрите также
Представлено до R2006a
Открытый пример
У вас есть модифицированная версия этого примера. Вы хотите открыть этот пример со своими редактированиями?
Документация MATLAB
Поддержка
© 1994-2020 The MathWorks, Inc.
1. Если смысл перевода понятен, то лучше оставьте как есть и не придирайтесь к словам, синонимам и тому подобному. О вкусах не спорим.
2. Не дополняйте перевод комментариями “от себя”. В исправлении не должно появляться дополнительных смыслов и комментариев, отсутствующих в оригинале. Такие правки не получится интегрировать в алгоритме автоматического перевода.
3. Сохраняйте структуру оригинального текста — например, не разбивайте одно предложение на два.
4. Не имеет смысла однотипное исправление перевода какого-то термина во всех предложениях. Исправляйте только в одном месте. Когда Вашу правку одобрят, это исправление будет алгоритмически распространено и на другие части документации.
5. По иным вопросам, например если надо исправить заблокированное для перевода слово, обратитесь к редакторам через форму технической поддержки.
Источник статьи: http://docs.exponenta.ru/R2020a/matlab/ref/length.html