nan matlab что это
Документация
Бесконечность и NaN
Бесконечность
Несколько примеров операторов, которые возвращают положительную или отрицательную бесконечность в MATLAB, показывают здесь.
x = exp (1000)
x =
Inf
x = регистрируйте (0)
x =
Inf
Используйте isinf функция, чтобы проверить тот x положительная или отрицательная бесконечность:
Можно также создать NaN s:
NaN функция возвращает одно из представлений арифметики IEEE для NaN как double скалярное значение. Точное поразрядное шестнадцатеричное представление этого NaN значение,
Всегда используйте isnan функция, чтобы проверить, что элементами в массиве является NaN :
MATLAB сохраняет состояние “Not a Number” альтернативного NaN представления и обработки все различные представления NaN эквивалентно. Однако в некоторых особых случаях (возможно, из-за аппаратных ограничений), MATLAB не сохраняет точную комбинацию двоичных разрядов альтернативного NaN представления в течение целого вычисления, и вместо этого используют канонический NaN комбинация двоичных разрядов, заданная выше.
Логические операции на NaN
Поскольку два NaN s не равны друг другу, логические операции, включающие NaN всегда возвращайте false, за исключением теста для неравенства, ( NaN
Документация MATLAB
Поддержка
© 1994-2021 The MathWorks, Inc.
1. Если смысл перевода понятен, то лучше оставьте как есть и не придирайтесь к словам, синонимам и тому подобному. О вкусах не спорим.
2. Не дополняйте перевод комментариями “от себя”. В исправлении не должно появляться дополнительных смыслов и комментариев, отсутствующих в оригинале. Такие правки не получится интегрировать в алгоритме автоматического перевода.
4. Не имеет смысла однотипное исправление перевода какого-то термина во всех предложениях. Исправляйте только в одном месте. Когда Вашу правку одобрят, это исправление будет алгоритмически распространено и на другие части документации.
5. По иным вопросам, например если надо исправить заблокированное для перевода слово, обратитесь к редакторам через форму технической поддержки.
Документация
Создайте массив всего NaN значения
Синтаксис
Описание
Примеры
Матрица NaN Значения
Создайте 3х3 матрицу NaN значения.
Трехмерный массив NaN Значения
Создайте массив 2 на 3 на 4 NaN значения и отображение его размер.
Клонирование размера от существующего массива
Создайте массив NaN значения, который одного размера с существующим массивом.
Задайте тип данных NaN Значения
Входные параметры
n — Размер квадратной матрицы
целое число
Размер квадратной матрицы в виде целого числа.
Если n 0, затем X пустая матрица.
Если n отрицательно, затем это обработано как 0.
Типы данных: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
sz1. szN — Размер каждой размерности в списке
целые числа
Размер каждой размерности в списке в виде отдельных целочисленных аргументов.
Если размер какой-либо размерности 0, то X пустой массив.
Если размер какой-либо размерности отрицателен, то это обработано как 0.
После второго измерения, NaN игнорирует последующие измерения длины 1. Например, NaN(3,1,1) создает вектор 3 на 1 из NaN значения.
Типы данных: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
sz — Размер каждой размерности в векторе
вектор-строка из целых чисел
Размер каждой размерности в векторе в виде вектора-строки из целых чисел.
Если размер какой-либо размерности 0, то X пустой массив.
Если размер какой-либо размерности отрицателен, то это обработано как 0.
После второго измерения, NaN игнорирует последующие измерения длины 1. Например, NaN([3 1 1]) создает вектор 3 на 1 из NaN значения.
Типы данных: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
typename тип данных
‘double’ (значение по умолчанию) | single’
p — Прототип массива
массив
Прототип создаваемого массива в виде массива.
Типы данных: double | single
Поддержка комплексного числа: Да
Советы
NaN значения не равны друг другу. В результате включение операций сравнения NaN возвратите false, за исключением не равного оператора
= NaN возвращает логическую единицу ( true ).
Используйте isnan или ismissing функция, чтобы обнаружить NaN значения в массиве. rmmissing функция обнаруживает и удаляет NaN значения и fillmissing функция обнаруживает NaN значения и заменяют их на non- NaN значения.
Расширенные возможности
Генерация кода C/C++
Генерация кода C и C++ с помощью MATLAB® Coder™.
Указания и ограничения по применению:
Размерности должны быть действительными, неотрицательными, целые числа.
Генерация кода графического процессора
Сгенерируйте код CUDA® для NVIDIA® графические процессоры с помощью GPU Coder™.
Указания и ограничения по применению:
Размерности должны быть действительными, неотрицательными, целые числа.
Эта функция полностью поддерживает основанные на потоке среды. Для получения дополнительной информации смотрите функции MATLAB Запуска в Основанной на потоке Среде.
Массивы графического процессора
Ускорьте код путем работы графического процессора (GPU) с помощью Parallel Computing Toolbox™.
Указания и ограничения по применению:
Можно задать базовый тип datatype как одна из этих опций:
Распределенные массивы
Большие массивы раздела через объединенную память о вашем кластере с помощью Parallel Computing Toolbox™.
Указания и ограничения по применению:
Можно задать базовый тип datatype как одна из этих опций:
Можно также задать p как codistributed или distributed массив.
Документация
Создайте массив всех значений NaN
Синтаксис
Описание
Примеры
Матрица значений NaN
Трехмерный массив значений NaN
Клонирование размера от существующего массива
Задайте тип данных значений NaN
Входные параметры
n Размер квадратной матрицы
целое число
Размер квадратной матрицы, заданной как целое число.
Если n 0, то X является пустой матрицей.
Если n отрицательно, это эквивалентно n = 0.
Типы данных: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
sz1. szN — Размер каждой размерности в списке
целые числа
Размер каждой размерности в списке, заданном как отдельные целочисленные аргументы.
Если размер какой-либо размерности 0, то X является пустым массивом.
Если размер какой-либо размерности отрицателен, то это обработано как 0.
Типы данных: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
Если размер какой-либо размерности 0, то X является пустым массивом.
Если размер какой-либо размерности отрицателен, то это обработано как 0.
Типы данных: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
typename — Тип данных
‘double’ (значение по умолчанию) | single’
p Прототип массива
массив
Прототип создаваемого массива, заданный как массив.
Типы данных: double | single
Поддержка комплексного числа: Да
Советы
= NaN возвращает логическую единицу ( true ).
Расширенные возможности
Генерация кода C/C++
Генерация кода C и C++ с помощью MATLAB® Coder™.
Указания и ограничения по применению:
Размерности должны быть действительными, неотрицательными, целые числа.
Массивы графического процессора
Ускорьте код путем работы графического процессора (GPU) с помощью Parallel Computing Toolbox™.
Указания и ограничения по применению:
Смотрите NaN в документации Parallel Computing Toolbox™.
Nan matlab что это
Create array of all NaN values
Syntax
Description
Examples
Matrix of NaN Values
Create a 3-by-3 matrix of NaN values.
3-D Array of NaN Values
Create a 2-by-3-by-4 array of NaN values and display its size.
Clone Size from Existing Array
Create an array of NaN values that is the same size as an existing array.
It is a common pattern to combine the previous two lines of code into a single line.
Specify Data Type of NaN Values
Input Arguments
n — Size of square matrix
integer
Size of square matrix, specified as an integer.
If n is 0, then X is an empty matrix.
If n is negative, then it is treated as 0.
Data Types: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
sz1. szN — Size of each dimension in a list
integers
Size of each dimension in a list, specified as separate integer arguments.
If the size of any dimension is 0, then X is an empty array.
If the size of any dimension is negative, then it is treated as 0.
Beyond the second dimension, NaN ignores trailing dimensions of length 1. For example, NaN(3,1,1) creates a 3-by-1 vector of NaN values.
Data Types: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
sz — Size of each dimension in a vector
row vector of integers
Size of each dimension in a vector, specified as a row vector of integers.
If the size of any dimension is 0, then X is an empty array.
If the size of any dimension is negative, then it is treated as 0.
Beyond the second dimension, NaN ignores trailing dimensions of length 1. For example, NaN([3 1 1]) creates a 3-by-1 vector of NaN values.
Data Types: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
typename — Data type
‘double’ (default) | single’
p — Prototype of array
array
Prototype of array to create, specified as an array.
Data Types: double | single
Complex Number Support: Yes
NaN values are not equal to each other. As a result, comparison operations involving NaN return false, except for the not equal operator
= NaN returns logical 1 ( true ).
Use the isnan or ismissing function to detect NaN values in an array. The rmmissing function detects and removes NaN values, and the fillmissing function detects NaN values and replaces them with non- NaN values.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Dimensions must be real, nonnegative, integers.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
Usage notes and limitations:
Dimensions must be real, nonnegative, integers.
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™.
Usage notes and limitations:
You can specify the underlying type datatype as one of these options:
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
Usage notes and limitations:
You can specify the underlying type datatype as one of these options:
You can also specify p as a codistributed or distributed array.
Nan matlab что это
Create array of all NaN values
Syntax
Description
Examples
Matrix of NaN Values
Create a 3-by-3 matrix of NaN values.
3-D Array of NaN Values
Create a 2-by-3-by-4 array of NaN values and display its size.
Clone Size from Existing Array
Create an array of NaN values that is the same size as an existing array.
It is a common pattern to combine the previous two lines of code into a single line.
Specify Data Type of NaN Values
Input Arguments
n — Size of square matrix
integer
Size of square matrix, specified as an integer.
If n is 0, then X is an empty matrix.
If n is negative, then it is treated as 0.
Data Types: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
sz1. szN — Size of each dimension in a list
integers
Size of each dimension in a list, specified as separate integer arguments.
If the size of any dimension is 0, then X is an empty array.
If the size of any dimension is negative, then it is treated as 0.
Beyond the second dimension, NaN ignores trailing dimensions of length 1. For example, NaN(3,1,1) creates a 3-by-1 vector of NaN values.
Data Types: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
sz — Size of each dimension in a vector
row vector of integers
Size of each dimension in a vector, specified as a row vector of integers.
If the size of any dimension is 0, then X is an empty array.
If the size of any dimension is negative, then it is treated as 0.
Beyond the second dimension, NaN ignores trailing dimensions of length 1. For example, NaN([3 1 1]) creates a 3-by-1 vector of NaN values.
Data Types: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
typename — Data type
‘double’ (default) | single’
p — Prototype of array
array
Prototype of array to create, specified as an array.
Data Types: double | single
Complex Number Support: Yes
NaN values are not equal to each other. As a result, comparison operations involving NaN return false, except for the not equal operator
= NaN returns logical 1 ( true ).
Use the isnan or ismissing function to detect NaN values in an array. The rmmissing function detects and removes NaN values, and the fillmissing function detects NaN values and replaces them with non- NaN values.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Dimensions must be real, nonnegative, integers.
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
Usage notes and limitations:
Dimensions must be real, nonnegative, integers.
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™.
Usage notes and limitations:
You can specify the underlying type datatype as one of these options:
Distributed Arrays
Partition large arrays across the combined memory of your cluster using Parallel Computing Toolbox™.
Usage notes and limitations:
You can specify the underlying type datatype as one of these options:
You can also specify p as a codistributed or distributed array.