f



Call Java from Matlab #2

I'm working with Matlab R2006b on Windows. I 'm intesresting by the
NetCDF Java package to access to data files for read and write.
I've found some examples, I try on Matlab, in the document : NetCDF
Java Users' Manuel (page 33-34).

I need some help to call some classes of the librairy nc2.2.jar,
particulary for writing files :
all the classes type ArrayInt (Double, ...) for dimensions D1, D2, D3
....

I success to manage dimension, attribut, but I don't manage to create
a array of data for any dimension I know.
In Matlab, the instruction :
ucar.ma2.ArrayInt.D3(2, latDim.getLength(), lonDim.getLength())
answers that the method D3 doesn't exist.
I can't call with the "$" character as it is declared in the package
ucar.ma2.
(ex : ArrayInt$D1).

Is there anybody who have encounter this king of problem ? If yes,
could he/she bring me some help ?
In extension, if anybody has some informations for writing NetCDF
files with Java librairies in Matlab, I'm interesting.

Thanks by advance.
0
7/9/2007 2:11:38 PM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
468 Views

Similar Articles

[PageSpeed] 25

Roger GALLOU wrote:
>
> In Matlab, the instruction :
> ucar.ma2.ArrayInt.D3(2,latDim.getLength(),lonDim.getLength())
> answers that the method D3 doesn't exist.
> I can't call with the "$" character as it is declared in the
> package ucar.ma2. (ex : ArrayInt$D1).

Matlab (currently) has a limitation in that it cannot access internal
classes (D1 in your case). The solution I could find is to recompile
the package with all classes being external. Obviously this is not
possible with 3rd party classes. Sorry for the bad news. Maybe
someone else has a better workaround.

Yair Altman
 <http://www.ymasoftware.com>
0
altmanyDEL (1141)
7/20/2007 11:21:11 AM
Reply: