Can MatLab understand Java int datatype? -
I have a java.util.HashMap object that I usually want to convert to a MatLab datatype, maybe new Containers Map type
Ideally I could:
it = javaHashMapObj.keySet.iterator; While this is HICEN JEKY = it.next; SomeMatlabObj (jkey) = javaHashMapObj.get (jkey); Lastly
Other potential problems (please tell, if they jump on you then solve!), Then this issue is that if Java hashmic is placed with integer, then < Code> This next will still return double objects to MatLab, which will no longer function as a key in the Hashmap with javaHashMapObj.get
.
Can anyone recommend a way to solve it? Increase the Java object to give me the key to MatLab int32?
MATLAB is a regularly entered number (which is double) for a Java primitive int , But if you want an integer object, you must explicitly put it in the box:
javaHashMapobj.get (java.lang.Integer (key));
How to change data types in MATLAB from Java, see this table
Comments
Post a Comment