Answer 3.13

The `symbolic toolbox' uses a standard notation. It denotes a square root as $ ^\wedge$ (1/2). Hence, sqrt(x$ ^\wedge$ 2) is rewritten as (x$ ^\wedge$ 2)$ ^\wedge$ (1/2).

Notice that, in general, sqrt(x$ ^\wedge$ 2) equals abs(x) and not just x. Therefore, MATLAB holds on to the square root.

>> syms x
>> sqrt(x^2)

ans =

Back      Next exercise

Esteur 2010-03-22