Is it possible for MATLAB to read binary files created by LabVIEW?
13 views (last 30 days)
Show older comments
I would like to know if MATLAB can read binary files created by LabVIEW from National Instruments.
Accepted Answer
MathWorks Support Team
on 18 Oct 2013
MATLAB does not have any utilities for reading files created by LabVIEW. However, MATLAB has several low level file I/O functions that can be used to read binary files in general. For instance, the FREAD function can be used to read binary data from a file. These MATLAB low level file I/O functions can be used to code a program that could read such binary files.
Note: LabVIEW uses Big Endian format for its binary numbers, while MATLAB on WIndows uses Little Endian format by default. If you are on a Windows machine and are using FREAD to read data from a binary file created by LabView, please be sure to specify the 'machineformat' input appropriately.
It is very important to know the exact format of the data written in the binary file which should be supplied by the author of the binary file. This information should include the length of the header in bytes, it's format and the number of rows and columns of data stored in the file alongwith the format in which the data is written.
For a complete listing of all of the available functions in MATLAB for low-level file I/O, type "help iofun" at the MATLAB prompt.
0 Comments
More Answers (0)
See Also
Categories
Find more on LabVIEW in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!