Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: complex error function and syms
Replies: 1   Last Post: Nov 26, 2012 10:30 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Christopher Creutzig

Posts: 262
Registered: 2/24/09
Re: complex error function and syms
Posted: Nov 26, 2012 10:30 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 11.10.12 15:02, Rok mr wrote:
> Hi,
> I would like to use erf function for complex numbers. Where complex number contain symbol
> example:
>
> sig=any real number
> syms w
> z=sig+i*w
> e=erf(z)
> (return: Complex number with symbol w)
>
> Any hints how to solve this problem?


I'm not sure what the ?problem? is.

>> sig = 2;
>> syms w
>> z=sig+i*w


z =

w*i + 2

>> e=erf(z)

e =

erf(w*i + 2)

>> subs(e, w, 2)

ans =

erf(2 + 2*i)

>> double(subs(e, w, 2))

ans =

1.1513 + 0.1273i


Behaves exactly as I would have expected. (Tested in R2012a.)



Christopher




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.