How to read a binary file from Matlab fwrite with 'single'?

Greetings to Big John and any friends on this forum.

I try to read a binary file got from Matlab with fwrite(file#, Matrix, 'single').
However I can not figur out how to read it out with TB5.5 Gold?

Can you give me a hand?
Many thanks



Reading files from Matlab


Unless you know exactly how this Matlab file is formatted, then you are heading for a long hard job.

Basically you will need to open the file in TrueBASIC as a BYTE file. You can then read this file byte by byte and dispaly each byte on screen as a numeric value between 0 and 255.

The file may have an initial "header" sequence of bytes.
This may be followed by a some bytes that tell you how big the file is. This is commonly used in image files such as BMP format. Since the file is labelled MATRIX and SINGLE I suspect that the file contains a matrix of data with each data item being a single value. The word SINGLE could also refer to the value being SINGLE PRECISION i.e. four bytes per numerical value. Note that TrueBASIC only uses DOUBLE PRECISION numbers, i.e. 8 bytes per numeric value.

In order to unravel the file you will also need to discover what method the file uses to separate one number from another, for example commas, pipes, colons etc.

I would advise you to determine the file format by asking Matlab rather than trying to figure it out yourself.

Big John