简体   繁体   中英

Initialising MLSparse matrix from JMatio library in Java

In Java I have a lot of double[][] matrices which are sparse. I need to export all those matrices to Matlab. I use JMatio library for that. When I try to use MLDouble, I run out of memory. I would like to use MLSparse but cannot find any documentation on how to instantiate and initialise one. Any suggestions welcome.

Name is any name.

dimensions should be obvious, a int array with the dimensions.

attributes is 0.

For nzmax refer to the matlab documentation of nzmax and sparse. It's the amount of storage allocated for nonzero matrix elements. If known, set to the number of elements you want to add, otherwise set a sufficient upper bound.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM