C = power(A, B)
C = A .^ B
| Parameter | Description |
|---|---|
| A | a variable |
| B | a variable |
| Parameter | Description |
|---|---|
| C | result of A.^B |
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.
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)
| Version | Description |
|---|---|
| 1.0.0 | initial version |
| 2.0.0 | expanded sparse single and complex single support |