a
is a simple 2x
2 matrix in octave. I save it as binary data in data.bin
:
octave:42> save -binary data.bin a
Now I would like to open the file and read the data from outside octave. I tried to use liboctave
(do_load()
and read_binary_data()
) following this example (http://wiki.octave.org/Fortran) but without success.
I use
do_load (file, fname, format, oct_mach_info::flt_fmt_unknown, false, false, true, argv, 0,` 1, 1);
I have an error with read_binary_data()
error: load: trouble reading binary file `data.bin'
The file is ok (I can load it from octave), so I guess I'm doing something wrong.. but what?