| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
X = pow2(Y)
X = pow2(F,E)
X = pow2(Y) returns an array X whose elements are 2 raised to the power Y.
X = pow2(F,E) computes
for corresponding elements
of F and E. The result is computed quickly
by simply adding E to the floating-point exponent of F.
Arguments F and E are real and integer
arrays, respectively.
This function corresponds to the ANSI C function ldexp() and the IEEE floating-point standard function scalbn().
For IEEE arithmetic, the statement X = pow2(F,E) yields the values:
F E X
1/2 1 1
pi/4 2 pi
-3/4 2 -3
1/2 -51 eps
1-eps/2 1024 realmax
1/2 -1021 realmin log2, exp, hex2num, realmax, realmin
The arithmetic operators ^ and .^
![]() | polyvalm | power | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |