Help CenterHelp Center
Unary plus
C = +A
C = uplus(A)
example
C = +Areturns arrayAand stores it inC.
A
C
C = uplus(A)is an alternate way to execute+A, but is rarely used. It enables operator overloading for classes.
+A
collapse all
Create a 2-by-2 matrix,A.
A = [1 -3; -2 4]
A =2×21 -3 -2 4
Use unary plus onA.
C =2×21 -3 -2 4
CandAare the same.
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|calendarDurationComplex Number Support:Yes
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
logical
char
duration
calendarDuration
This function fully supports tall arrays. For more information, seeTall Arrays.
不能输入数据类型logical.
backgroundPool
ThreadPool
This function fully supports thread-based environments. For more information, seeRun MATLAB Functions in Thread-Based Environment.
This function fully supports GPU arrays. For more information, seeRun MATLAB Functions on a GPU(Parallel Computing Toolbox).
This function fully supports distributed arrays. For more information, seeRun MATLAB Functions with Distributed Arrays(Parallel Computing Toolbox).
uminus|plus
uminus
plus
You have a modified version of this example. Do you want to open this example with your edits?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office