[scilab-Users] Elliptic integral

Igwe, Chuk Chuk.Igwe at agcocorp.com
Tue Aug 31 08:25:01 CEST 2010


Were you at pursue?
Chuk Igwe

----- Original Message -----
From: Peter.Cusack at csiro.au [mailto:Peter.Cusack at csiro.au]
Sent: Monday, August 30, 2010 07:44 PM
To: users at lists.scilab.org <users at lists.scilab.org>
Subject: [scilab-Users] Elliptic integral

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.
************************************************************************************************************************************************************************************************************ This email is intended solely for the use of the individual to whom it is addressed and may contain confidential and/or privileged material. Any views or opinions presented are solely those of the author and do not necessarily represent those of AGCO. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. Neither AGCO nor the sender accepts any responsibility for viruses and it is your responsibility to scan and virus check the e-mail and its attachment(s) (if any).

This email is intended solely for the use of the individual to whom it is addressed and may contain confidential and/or privileged material. Any views or opinions presented are solely those of the author and do not necessarily represent those of AGCO. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. Neither AGCO nor the sender accepts any responsibility for viruses and it is your responsibility to scan and virus check the e-mail and its attachment(s) (if any).



More information about the users mailing list