Plotting argument of complex function with syms parameter

1 view (last 30 days)
>> ezplot(atan(imag((3*exp(pi*l*4*i) + 1)/(9*exp(pi*l*4*i) - 1)), real((3*exp(pi*l*4*i) + 1)/(9*exp(pi*l*4*i) - 1)))) Error using inlineeval (line 15) Error in inline expression ==> arg(imag((3.*exp(pi.*l.*(4.*i)) + 1)./(9.*exp(pi.*l.*(4.*i)) - 1)).*i + real((3.*exp(pi.*l.*(4.*i)) + 1)./(9.*exp(pi.*l.*(4.*i)) - 1))) Undefined function 'arg' for input arguments of type 'double'.
Error in inline/feval (line 34) INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr, INLINE_OBJ_.expr);
Error in ezplotfeval (line 52) z = feval(f,x(1));
Error in ezplot>ezplot1 (line 469) [y, f, loopflag] = ezplotfeval(f, x);
Error in ezplot (line 145) [hp, cax] = ezplot1(cax, f{1}, vars, labels, args{:});
Error in sym/ezplot (line 61) h = ezplot(fhandle(f));
Is there another way of plotting the function?

Answers (1)

Walter Roberson
Walter Roberson on 17 Nov 2013
arg(C) with C a complex number, is atan2(imag(C), real(C))
  2 Comments
Bruno
Bruno on 17 Nov 2013
ezplot(atan2(imag((3*exp(pi*l*4*i) + 1)/(9*exp(pi*l*4*i) - 1)), real((3*exp(pi*l*4*i) + 1)/(9*exp(pi*l*4*i) - 1))),[0,1])
Undefined function 'atan2' for input arguments of type 'sym'.
I have also used atan instead. I manage to define the function bu not plot it.
The syms parameter is in the expression: it's l (see argument of exp).
Bruno

Sign in to comment.

Categories

Find more on Get Started with Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!