Hi,

I'm translating matlab code (a wrapper for Laurens van der Maaten's 
Barnes-Hut t-sne code) in order to learn Julia.

Within the code, data are saved as .dat file to then be read by a windows 
executable.

The Matlab code (which works on my system) writes the data this way:

* fwrite(h, n, 'integer*4');*
* fwrite(h, d, 'integer*4');*
*        fwrite(h, theta, 'double');*
*        fwrite(h, perplexity, 'double');*
* fwrite(h, no_dims, 'integer*4');*
*        fwrite(h, X', 'double');*

So, it writes every variable and determines it's datatype. Because I didn't 
find a way to specify the type, I simply translated this to:
*        write(h, n, d, theta, perplexity, no_dims, X')*

I successfully start the program with
* run(`bh_tsne`)*

However, the file doesn't seem to be read correctly by the executable. I 
know that the 1000x32 array X is read as 1000x0. The error message simply 
says 'Process exited(3221225477)'

How can I replicate the data file as it is saved by matlab? And related: 
how would I read such file in Julia (the program saves the results in 
another dat file)?

thanks! :)


Reply via email to