10-25-2017
04:26 PM
- last edited on
06-10-2025
11:19 AM
by
Content Cleaner
OK so first things first (to answer what will likely be the first 4 responses... )
1. Yes, I have looked at the DataPlugin. Unfortunately, I need much more capability than it supports.
2. Yes, I have looked at the matio library. It is a great start, but it is still incomplete and a little buggy.
3. No, I can't use the script node because the deployment PC won't have a matlab license.
4. Yes, I did see the EvaluMation toolkit on VIPM. I played with the trial and it seems much more complete and not buggy. Unfortunately, they were bought by AEgis, and I can no longer find a way to purchase a license.
Anyway, so yea. Does anyone have or know of a complete .mat file I/O toolkit? If not, it looks like I'll be going through the matfile format and debugging the parts of the matio library that I need to use. But that is tedious and I don't wanna
Solved! Go to Solution.
10-25-2017 05:47 PM - edited 10-25-2017 05:55 PM
I do not have a complete Mat file I/O, I have only written stuff to convert TDMS to Mat files, no need to read them.
Number 2 is your best bet for future compatibility as the old format, the matio library, is not being used as much.
mcduff
EDIT: Forgot to include a subVI. Now attached separately.
10-26-2017 09:09 AM
@mcduff wrote:
Number 2 is your best bet for future compatibility as the old format, the matio library, is not being used as much.
Thanks for your response. I've done some research on the HDF5 file format after your post... and I can't find anything really that supports this claim. Yes, MATLAB does support HDF5 files, but I can't find anything that says it's replacing the .MAT format by default.
I'm not contradicting you by the way - I'm just curious as to why you make the above claim. If I switch my plans from using .MAT to HDF5, I'd like to know why 🙂
10-26-2017 10:16 AM
The new version of the Mat file is based on HDF, See http://www.mathworks.com/help/matlab/import_export/mat-file-versions.html?requestedDomain=www.mathwo...
Look at the note "Version 7.3 MAT-files use an HDF5 based format"
You will see other limitations of the old version also, 2^31 bytes per variable, among others.
Note the example I sent only works for 1d arrays of doubles, you can as many arrays as you want, with aforementioned conditions.
mcduff
10-26-2017 11:32 AM
@mcduff wrote:
Look at the note "Version 7.3 MAT-files use an HDF5 based format"
So does this mean it is a modified HDF5 format, or is it actually HDF5 but with a .mat extension?
Worded another way, could I use the C++ HDF API to read a .mat file flawlessly?
10-26-2017 01:14 PM
I have used HDFView to open a mat 7.3 file, so an HDF file with a MAT extension and a Matlab specific header.
See the example I referenced earlier, use VIPM to get the HDF library. I won't attach it becasue you need the HDF library I referenced earlier but below is a snippet and documentation.
"Version 7.3 of the file format uses HDF5 internally, so h5labview can be used to
read MAT files to load data from MATLAB directly into LabVIEW. This example
demonstrates how to use h5labview to build a MAT file for loading into MATLAB."
mcduff
10-26-2017 02:00 PM
Great! I figured that was the case, but I wanted to validate since I am new to the HDF file format.
Thanks for all of your help.