Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

java method in NDsolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62266] java method in NDsolve
  • From: Pradeep Suresh <pradeep at purdue.edu>
  • Date: Fri, 18 Nov 2005 05:57:54 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

 Hi,
i have come across this general problem of implementing JAVA methods in 
Mathematica solver commands wherein the java method does not understand 
that its arguement is a variable that is manipulated by the solve 
command in question. Specifically, i used a method written by me that 
takes an integer arguement and returns that integer + 1.the method 
itself works fine and has been tested in mathematica, however, when i 
tried to use this method in one of the equations being solved by 
NDSolve, i have problems. To illustrate,

function[23] gives 24.
but when we have NDSolve[{y'[t]==function[t]*y+2, y[0]==1},{t,0,10}] 
gives this error
Java::argx1: Method named function defined in class MathLink was called 
with an incorrect number or type of arguments. The argument was t.

which i interpret as a problem of mathematica not parsing the arguement 
't' as an integer but as a character.

i hope somebody has come across a similar problem and has overcome it. 
This seems to be a very general problem and a serious shortcoming of 
mathematica if not solvable.
Plz help!
Thanks in advance!


  • Prev by Date: Re: Weighted histogram
  • Next by Date: Re: Export to PDF
  • Previous by thread: Re: NDSolve
  • Next by thread: Re: java method in NDsolve