|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmatio.io.MatFileWriter
public class MatFileWriter
MAT-file writer. Usage:
//1. First create example arrays
double[] src = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 };
MLDouble mlDouble = new MLDouble( "double_arr", src, 3 );
MLChar mlChar = new MLChar( "char_arr", "I am dummy" );
//2. write arrays to file
ArrayList list = new ArrayList();
list.add( mlDouble );
list.add( mlChar );
new MatFileWriter( "mat_file.mat", list );
this is "equal" to Matlab commands:
>> double_arr = [ 1 2; 3 4; 5 6];
>> char_arr = 'I am dummy';
>>
>> save('mat_file.mat', 'double_arr', 'char_arr');
| Constructor Summary | |
|---|---|
MatFileWriter(DataOutputStream output,
Collection<MLArray> data)
Writes MLArrays into OuputSteram. |
|
MatFileWriter(File file,
Collection<MLArray> data)
Writes MLArrays into File. |
|
MatFileWriter(String fileName,
Collection<MLArray> data)
Writes MLArrays into file given by fileName. |
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MatFileWriter(String fileName,
Collection<MLArray> data)
throws IOException
fileName.
fileName - - name of ouput filedata - - Collection of MLArray elements
IOException - if an i/o exception occurs, for instance cause by
file access
public MatFileWriter(File file,
Collection<MLArray> data)
throws IOException
File.
file - - an output Filedata - - Collection of MLArray elements
IOException - if an i/o exception occurs, for instance cause by
file access
public MatFileWriter(DataOutputStream output,
Collection<MLArray> data)
throws IOException
OuputSteram.
Writes MAT-file header and compressed data (miCOMPRESSED).
output - - OutputStreamdata - - Collection of MLArray elements
IOException - if an i/o exception occurs, for instance cause by
file access
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||