When the following code is executed, the output is

ans =

Empty sym: 0-by-1

although b = i = yp = [1 90]

I get the same result when I let b = [1 90] or yp instead of r2p(i), although [1 90] = 1 ∠90 degrees = i. Does anyone have suggestions regarding how I should modify the code so that r2p(i) is understood to mean [1 90] (1 ∠90 degrees)? When r2p(i) is typed in the command window, the output is correct.

` f = @(x,y) 2*x*y;x = f(30,3)*2; r2p = @(x) [abs(x) rad2deg(angle(x))]; % Rectangular -> Phasor`

p2r = @(x) x(1)*exp(1i*deg2rad(x(2))); % Phasor -> Rectangular

pm = @(x,y) [x(1)*y(1) x(2)+y(2)]; % Phasor Multiply

pd = @(x,y) [x(1)/y(1) x(2)-y(2)]; % Phasor Divide

x = 3+4i;xp = r2p(x);yp = [1 90];xptimesyp = pm(xp,yp);xrtimesyr = p2r(xptimesyp);Check = x * p2r(yp);syms a b c eqn = b==r2p(i); solve(eqn,b)

## Best Answer