<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">I was attempting to create a jagged array in Scilab to be sent to a Java instance. At first, I created a Double class array and had no problems:<br>a = jarray("java.lang.Double",3,1)<br>a(1) = [1 2 3]<br>a(2) = [4 5]<br>a(3) = 6<br><br>Next, I attempted to create a primitive double array instead:<br>b = jarray("double",3,1)<br>b(1) = [1 2 3]<br>b(2) = [4 5]<br>b(3) = 6<br>I had no problem with the first few lines. The problem occured at b(3) = 6 when I attempted to assign a single element value. I got this error:<br>!--error 999 <br>%s_i__EObj: An error occurred: Exception when calling Java method : Array [[D@dbe4e5 cannot contain object which is an instance of class java.lang.Double<br> at org.scilab.modules.external_objects_java.ScilabJavaArray.set(Unknown Source)<br> at org.scilab.modules.external_objects_java.ScilabJavaObject.insert(Unknown Source)<br>Array [[D@dbe4e5 cannot contain object which is an instance of class java.lang.Double<br> at org.scilab.modules.external_objects_java.ScilabJavaArray.set(Unknown Source)<br> at org.scilab.modules.external_objects_java.ScilabJavaObject.insert(Unknown Source)<br><br>It looks like it considers scalar values as Double type and not the primitive double. Is there a way to overcome this? Thanks!<br><br><br></div>
                                          </div></body>
</html>