Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I write binary data in LabVIEW to a Matlab MAT-file

280 views
Skip to first unread message

TimV

unread,
Feb 25, 2003, 7:31:44 PM2/25/03
to
I wish to use LabVIEW v6.1 to write binary data to a MATLAB binary
file (MAT-file, *.mat). My Matlab version is 6.5. Matlab will NOT be
installed on the computers that are acquiring the data and writing to
the data files, so a Matlab script node will not work in this
application.

I have already searched LabVIEW support AND the Developer Zone, with
only partial success. I did find one KnowledgeBase article <a
href="http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/2f8ed0f588e06be1862565a90066e9ba?OpenDocument">Can
I Import Data from MATLAB to LabVIEW or Vice-versa?</a> on this
subject. The example code in that article "LV40 to MAT file" does
indeed create .mat files, but this seems to be written for use with a
much older version of Matlab (version 4.0 and previous), and therefore
will not handle a Matlab "Structured Array" data type, which was
introduced in version 5.0. I am looking for an already written
LabVIEW Library of routines to accomplish this, and I am willing to
pay for a commercial product, if such a product exists.

Jeremy Braden

unread,
Feb 26, 2003, 1:44:27 PM2/26/03
to
I do not know of a commerical product. You have to dig through the
Mathworks site for the structure of their .mat file. Once you have
that, we will be able to help.

Tim Vargo

unread,
Mar 31, 2003, 12:20:08 PM3/31/03
to
I could still use an answer to this, if anyone has an answer.

Tim

VI Guy

unread,
Mar 31, 2003, 7:39:25 PM3/31/03
to
The task you are asking is pretty simple, in concept. However, it
will take many hours to implement. So the question is how much do you
want to spend? Most of us charge by the hour.

Tim Vargo

unread,
Apr 1, 2003, 11:15:05 AM4/1/03
to
I could swing a couple hundred dollars, perhaps three. The hard part
will be defining exactly what I need, since I have a very specific
data structure in mind. Basically, I need routines that will convert
an array of LV Waveforms, including some Waveform Attributes, into a
Matlab "Structured Array" data type, then save that to a .mat file. I
also need to include some text comments.

My need is immediate. Anyone wishing to explore the possibility of
writing this code "for sale" should email me direct at
tdv...@sandia.gov, and leave me a phone number to contact you at.

Thanks!

B. Rad.

unread,
Apr 24, 2003, 2:47:02 AM4/24/03
to
Hello Tim,

I'm dealing with exactly the same problem.

My Solution is to use the C-functions for reading/writing mat-files
provided with the MatLab distribution. I will try do generate a
dll-library with this functions and I hope I can use the LabVIEW
dll-interface to get this c-functions in the dll under LabVIEW
running. If this solution fails I will try to generate a little help
program which reads/writes the data from/to a mat-File by using
commandline arguments.

But I still hope there is an much easier way to get a working
solution, so I haven't start programming yet.

0 new messages