[Scilab-users] scilab ode from java
P J Binu
pjbinu at cdac.in
Wed Dec 19 13:10:46 CET 2012
Hi,
I am trying to call ode from java. but it shows
an error like following,
foo[1,1] = sci_matrix
getHeight() = 1
getHeight() = 5
intdy-- t (=r1) illegal
where r1 is : 0.2500000000000D-01
t n est pas entre tcur - hu (= r1) et tcur (=r2)
where r1 is : 0.8694709664001D-02 and r2 : -0.7179037253078D-01
lsoda-- problems due to intdy. itask=i1,tout=r1
where i1 is : 1
where r1 is : 0.2500000000000D-01
testing
my code is as follows,
class Example1 {
public static void main(String[] args) throws Exception{
try {
Scilab sci = new Scilab(true);
if (sci.open())
{
sci.exec("function dx=f(t,x);dx =sin(2*t);endfunction");
ScilabDouble t0=new ScilabDouble(0);
ScilabDouble x0=new ScilabDouble(0.5);
sci.put("t0",t0);
sci.put("x0",x0);
sci.exec("[t] = linspace(0,0.1,5);");
ScilabType t=sci.get("t");
System.out.println("foo[1,1] = " + t.getType());
System.out.println("getHeight() = " + t.getHeight());
System.out.println("getWidth() = " + t.getWidth());
sci.put("t",t);
sci.exec("x = ode ( t0 , x0 , t , f ) ;");
sci.exec("plot2d(t,x);");
System.out.println("testing " );
}
else
System.out.println("Not opening scilab " );
} catch (org.scilab.modules.javasci.JavasciException e) {
System.out.println("test " );
System.err.println("An exception occurred: " + e.getMessage());
}
}
}
*Thanks and Regards
P J Binu | Senior Engineer | Heath Informatics | C-DAC Trivandrum| Kerala |
India | <mailto:pjbinu at cdac.in> pjbinu at cdac.in | <http://www.cdactvm.in/>
www.cdactvm.in|
Voice : +91 9496236198 | Video Conference : 0471 2313282
-------------------------------------------------------------------------------------------------------------------------------
This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
-------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20121219/52104ee9/attachment.htm>
More information about the users
mailing list