[scilab-Users] Elliptic integral

Peter.Cusack at csiro.au Peter.Cusack at csiro.au
Wed Sep 1 05:35:10 CEST 2010


Thanks Mathieu;

That leads to a problem that I was trying to avoid, having to install a compiler then master enough of it to link code.

If it is the only way out, then I'll try, but it seems much harder than just getting an internal function to work.

On the upside though, there are some links to some very good documentation there that might help me find a solution (if I can ever read enough).

Cheers;

Peter.

> -----Original Message-----
> From: Mathieu Dubois [mailto:mathieu.dubois at limsi.fr]
> Sent: Tuesday, 31 August 2010 18:56
> To: Cusack, Peter (CMSE, Lindfield)
> Subject: Re: [scilab-Users] Elliptic integral
> 
> Hello Peter,
> 
> I know nothing about elliptic integrals but there is a scilab function
> that may help you: %asn
> 
> Otherwise I found this website:
> http://www.nag.co.uk/doc/techrep/html/TR5_09/Tr5_09.asp (there is an
> example for elliptic integrals of the second kind).
> 
> HTH,
> Mathieu
> 
> 
> On 08/31/2010 01:44 AM, Peter.Cusack at csiro.au wrote:
> > Hi all.
> >
> > I'm writing some code to simulate a magnetic field. It uses elliptic
> integrals of the first and second kind. The elliptic integral of the
> second kind is not part of the Scilab function list, so I created one as
> shown below.
> >
> > -->deff('y=f(t,k)','y=sqrt((1-(k*t)^2)/(1-t^2))') //Core definition
> for integral
> > -->deff('[ec]=elliptic_ec(k)','ec=intg(0,1,list(f,k))') //Second kind,
> not built into SciLab
> >
> > When this runs, I get the following error message:
> >
> > !--error 98
> > Variable returned by scilab argument function is incorrect.
> >
> > at line       2 of function elliptic_ec called by :
> > at line       2 of function Bx called by :
> > at line       2 of function Bxt called by :
> > Bcentre=Bxt(0,0) //*Field at centre of winding*/
> >
> > I'm looking for help to get past this. If the variable is incorrect,
> what should it be and how can I correct it?
> >
> > If, as I suspect, the error is what's left after a failed computation,
> can someone point me to a more reliable method to calculate the elliptic
> integral?
> >
> > Cheers;
> >
> > Peter.
> >
> > Peter Cusack, BE, MSc
> > Control Engineer
> > CSIRO Materials Science and Engineering
> > CSIRO
> >
> > Phone: +61 2 9413 7123 | Fax: +61 2 9413 7200
> > peter.cusack at csiro.au | www.csiro.au | www.csiro.au/cmse
> > Address: PO Box 218, Lindfield, NSW 2070, Australia
> >
> > PLEASE NOTE
> > The information contained in this email may be confidential or
> privileged. Any unauthorised use or disclosure is prohibited. If you
> have received this email in error, please delete it immediately and
> notify the sender by return email. Thank you. To the extent permitted by
> law, CSIRO does not represent, warrant and/or guarantee that the
> integrity of this communication has been maintained or that the
> communication is free of errors, virus, interception or interference.
> >
> > Please consider the environment before printing this email.
> >
> >




More information about the users mailing list