mirror of https://github.com/jlizier/jidt
Added a Matlab utility function to save CA data in a (relatively) efficient data format, since Matlab will only save doubles for ascii format.
This commit is contained in:
parent
c2b1f7ef25
commit
257ef285d3
|
|
@ -0,0 +1,16 @@
|
|||
%
|
||||
% Utility function to save raw CA data to a text file format.
|
||||
% Unfortunately MAtlab's -ascii format only writes full doubles, making much larger files than we need.
|
||||
% So I wrote this.
|
||||
|
||||
function saveCA(filename, caStates)
|
||||
|
||||
warning('off','MATLAB:Java:DuplicateClass');
|
||||
javaaddpath('../../../infodynamics.jar');
|
||||
addpath('..');
|
||||
|
||||
arrayWriter = javaObject('infodynamics.utils.ArrayFileWriter');
|
||||
arrayWriter.makeIntMatrixFile(octaveToJavaIntMatrix(caStates), filename);
|
||||
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue