plot of abs or arg of a complex function [NOT A BUG]

Bugs in ND1 (report'em, get'em fixed)

plot of abs or arg of a complex function [NOT A BUG]

Postby abaer » Wed Jan 02, 2013 10:29 am

Hi

I would like to plot the "ABS" (or likewise the ARG or the RealPart etc) of a complex function, e.g.

eq=ABS((x,3)/(1,x))

This would be very handy e.g. to plot the frequency transfer function of a network.

However ND1 shows a coordinate system and the function as term, but no curve.

If however I calculate the absolute value of this function, i.e.

eq=sqrt(4x^2+(3-x^2)^2/4)

it works fine.

I am not sure if this is a bug in ND1 or a fault on my side.

Please help.
abaer
 
Posts: 3
Joined: Mon Dec 17, 2012 4:04 am

Re: plot of abs or arg of a complex function

Postby oliver » Wed Jan 02, 2013 11:30 pm

Hi abear,

'sqrt(4*x^2+(3-x^2)^2/4)' plots fine for me. Try (-1, 1.4) for minP and (1, 1.6) for maxP. (There's nothing to see below y=1.5. In case you expected the graph to match the one for 'abs((x,3)/(1,x))': it doesn't.)

ND1's draw command cannot (yet) plot functions taking complex arguments, even if the result is real-valued. That would be the reason why 'abs((x,3)/(1,x))' doesn't work.

It should be possible to do this with a new function in the Plot folder. I'll try this out and get back to you with some work-around.

Not a solution right now, but in case you're interested: The function 'abs((x+3*i)/(1+x*i))' can be plotted with the upcoming "plot" command, part of the upcoming CAS extension, which goes out to W|A for doing the hard work.

Sorry you're running into a limitation.

Oliver
oliver
Site Admin
 
Posts: 433
Joined: Sat May 01, 2010 2:11 pm

Re: plot of abs or arg of a complex function

Postby abaer » Sat Jan 05, 2013 3:13 pm

Thanks.
Your explanation that "ND1's draw command cannot (yet) plot functions taking complex arguments, even if the result is real-valued." is sufficient for me.
Hope that some day ND1 will be able to plot these kind of functions.
Regards
abaer
 
Posts: 3
Joined: Mon Dec 17, 2012 4:04 am


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron