From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does there exist a .mat-to-LabVIEW converter?

I need to be able to read from and write to .mat files from within LabVIEW. The .mat file format is what Matlab uses to store arrays. I have found that The Math Works offers a C library with functions for accessing .mat files. I suppose I can use this library to create a .dll (or use CINs). Is there a software utility currently available to do this?
0 Kudos
Message 1 of 4
(2,844 Views)
> I need to be able to read from and write to .mat files from within
> LabVIEW. The .mat file format is what Matlab uses to store arrays. I
> have found that The Math Works offers a C library with functions for
> accessing .mat files. I suppose I can use this library to create a
> dll (or use CINs). Is there a software utility currently available
> to do this?

This isn't a convertor, but you can reuse Matlab from within LV. LV5.1
I think, added the script node. You can type in or popup and import
matlab scripts. At runtime, the script contacts a Matlab EXE to have
the computations performed and to return the results into LV.

Greg McKaskle
0 Kudos
Message 2 of 4
(2,844 Views)
If you go to www.ni.com and do a search for:
+".mat" +labview
you should find the utility you are looking for.

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 3 of 4
(2,844 Views)
It's the one that you mentioned ... and you can find
- description of those C functions
[http://www.mathworks.com/access/helpdesk/help/techdoc/apiref/apiref.shtml]
- how to download and compile (it will be a little bit different if you want to use CIN)
[http://www.mathworks.com/support/solutions/data/8757.shtml]
- MAT-file format if you want to develop your own LabVIEW utility to do the job
[http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf]
good luck!
0 Kudos
Message 4 of 4
(2,844 Views)