From: Enter The on
I have a struct in matlab that I want to store in a java hashtable,
however, when I use the hashtable.put function I get:

??? No method 'put' with matching signature found for class
'java.util.Hashtable'.
From: Yair Altman on
Enter The <enterthe(a)walla.com> wrote in message <09ef80db-8e98-438e-ad5e-df70f226214b(a)j27g2000yqn.googlegroups.com>...
> I have a struct in matlab that I want to store in a java hashtable,
> however, when I use the hashtable.put function I get:
>
> ??? No method 'put' with matching signature found for class
> 'java.util.Hashtable'.


That's indeed problematic. Java does not have a native type that corresponds to a Matlab struct. You can either create a Java class that maps to the struct, or if you have Matlab R2008b (7.7) or later you can use the built-in containers.Map function, which is a scaled-down Matlab version of the java.util.Map interface.

Also see: http://stackoverflow.com/questions/436852/storing-matlab-structs-in-java-objects

Note that the recently-released R2010a (7.10) added a containers.Map functionality of specifying the expected data types.

Yair Altman
http://UndocumentedMatlab.com