02-05-2015 11:13 PM
Can anyone explain to me how to use the data plugin to write to mat files. I have tried to write some code so far to use it but i keep getting an error -2533 highlight that the node did not return a correct refnum. My code to open the database works fine but it will not let me to write to it. Just so everyone knowns I am writing to level 5 matlab file running Labview 64 bits 2013 edition. Also let me point out in the code attached the opening of the database is all preconfigured and works fine.
02-06-2015 02:33 PM
Hi Anthonytec2,
I was able to find this forum post
https://forums.ni.com/t5/LabVIEW/Creating-mat-files-with-Matlab-dataplugin-in-LabVIEW/td-p/1678970
that provides an example of using the MAT data plugin to write to MAT files, hopefully this will be a good starting resource for you.
Otherwise it should be fairly simple to write these files with the read/write binary file functions. It seems that the MAT file format is well defined in this document:
https://www.mathworks.com/help/pdf_doc/matlab/matfile_format.pdf
so you should be able to write to it directly.
Additionally you may be able to use the MATI/O library to read and write to a MAT file.
http://sourceforge.net/projects/matio/
-Nate