You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of matlabcontrol are you using?
Release version: 4.0.0
What version of MATLAB are you using?
2011a 64-bit
What operating system are you using?
Windows 7 64-bit
Are you using matlabcontrol from inside MATLAB or outside MATLAB?
Outside in a Java application
What steps will reproduce the problem?
1. Run this code:
MatlabProxyFactoryOptions MATLABOptions = new
MatlabProxyFactoryOptions.Builder().setHidden(true).build();
MatlabProxyFactory factory = new MatlabProxyFactory(MATLABOptions);
MatlabProxy proxy = null;
MatlabTypeConverter converter = null;
try
{
proxy = factory.getProxy();
converter = new MatlabTypeConverter(proxy);
proxy.eval("a = [1+1i;2+2i;3+3i];");
double[][] arrayRealValues = converter.getNumericArray("a").getRealArray2D();
double[][] arrayImagValues = converter.getNumericArray("a").getImaginaryArray2D();
}
catch (Exception e)
{
System.err.println(e);
}
What did you expect to happen? What happened instead?
Expected to be able to access the variable in matlab without throwing an
exception. The following message/exception was displayed instead:
"matlabcontrol.MatlabInvocationException: RuntimeException occurred in
MatlabThreadCallable, see cause for more information"
The cause was indicated as: "java.lang.ClassCastException: [Ljava.lang.Object;
cannot be cast to [D"
Please provide any additional information below.
Note that the above program works perfectly if accessing a real valued
variable, i.e. if the eval line was adjusted to "proxy.eval("a = [1;2;3];");",
and the getImaginaryArray2D command was removed.
Original issue reported on code.google.com by ryan.van...@gmail.com on 24 Oct 2011 at 9:07
The text was updated successfully, but these errors were encountered:
Don't know if this is still and issue but there was a bug in the
MatlabTypeConverter in thye "call" method
Line 90 was missing the array index at the end
Should read
Object imaginaryObject = proxy.returningEval("imag(" + _arrayName + ");", 1)[0];
not
Object imaginaryObject = proxy.returningEval("imag(" + _arrayName + ");", 1);
Original comment by Derrick....@gmail.com on 3 Oct 2012 at 5:03
Original issue reported on code.google.com by
ryan.van...@gmail.com
on 24 Oct 2011 at 9:07The text was updated successfully, but these errors were encountered: