Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

uplus, +

Syntax

C = +A
C = uplus(A)

Description

example

C = +A returns array A and stores it in C.

C = uplus(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.

A = [1 -3; -2 4]
A = 

     1    -3
    -2     4

Use unary plus on A.

C = +A
C = 

     1    -3
    -2     4

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
Complex Number Support: Yes

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced before R2006a

Was this topic helpful?