LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i want to save arrays and SGL numbers in binary files and then open these files with matlab

the binary files in Labview must be of the same type with the binary files in matlab.how can i save the arrays and\or the numbers in binary files and then open them with matlab?
0 Kudos
Message 1 of 2
(2,694 Views)
laborarory,

First, you need to know the binary format of the MATLAB files. This is something that you will have to research by creating a few simple binary files in MATLAB and seeing what they look like. Better yet, if the format is documented somewhere, then use that.
Second, LabVIEW stoes information in files in Big Endian format. MATLAB probably uses Little Endian format. You will need to do some byte swapping to get either the proper values on disk (do swapping in LabVIEW) or do the swapping after reading the file in (do the swapping in MATLAB).
Lastly, you can now create the binary file in LabVIEW. See the shipping examples for a great start on creating small, simple binary files. If yours need to get more complicated, then start adding more items.

Randy
Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 2
(2,694 Views)