power
Element wise power, .^ operator
📝Syntax
C = power(A, B)
C = A .^ B
📥Input Arguments
Parameter Description
A a variable
B a variable
📤Output Arguments
Parameter Description
C result of A.^B
📄Description

C = power(A, B) performs an element wise power operation: A .^ B .

Sparse floating-point inputs are supported for double, single, complex double, and complex single data. Sparse bases preserve sparse storage for scalar, dense, or sparse exponents when the result can be represented as a sparse matrix.

If an exponent makes implicit sparse zeros nonzero, for example exponent 0 or a negative exponent, Nelson materializes the corresponding sparse pattern entries.

💡Examples
power(3, 4)
3.^4
A = sparse(single([2 0; 0 3]));
R = A .^ 2
full(R)
C = sparse(single([1 + 2i 0; 0 3]));
full(C .^ 2)
🔗See Also
mpower
🕔Version History
Version Description
1.0.0 initial version
2.0.0 expanded sparse single and complex single support
Edit this page on GitHub