rst 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');
@author Wojciech Gradkowski (wgradkowski@gmail.com)