uplus - Unary plus - MATLAB (original) (raw)

Main Content

Syntax

Description

C = +[A](#btykcuh-A) returns arrayA and stores it in C.

example

C = uplus([A](#btykcuh-A)) is an alternate way to execute +A, but is rarely used. It enables operator overloading for classes.

Examples

collapse all

Create a 2-by-2 matrix, A.

Use unary plus on A.

C and A are the same.

Input Arguments

collapse all

Input array, specified as a scalar, vector, matrix, or multidimensional array.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | duration | calendarDuration
Complex Number Support: Yes

Extended Capabilities

expand all

Theuplus function fully supports tall arrays. For more information, see Tall Arrays.

Inputs cannot be data type logical.

The uplus function fully supports GPU arrays. To run the function on a GPU, specify the input data as a gpuArray (Parallel Computing Toolbox). For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).

Version History

Introduced before R2006a