09-21-2020 02:44 AM
how to read and plot mat file in labview ?
Solved! Go to Solution.
09-21-2020
02:46 AM
- last edited on
06-09-2025
06:32 PM
by
Content Cleaner
Hi amandeepkaur,
@amandeepkaur wrote:
how to read and plot mat file in labview ?
You could use ReadBinaryFile and parse the mat file on your own.
You could also try to use DataPlugins for Matlab files…
09-21-2020 05:52 AM
You have to know the data that is in the mat file in order to parse it. But once you do, you can use Read Binary File to get the data. But Matlab, by default, will write the data in a Little Endian format while LabVIEW defaults to a Big Endian. So you need to use the Byte Order input on the Read Binary File to tell LabVIEW to use Little Endian.
09-21-2020 06:09 AM
how are we gonna know the data before reading it?
09-21-2020 06:10 AM
Hi amandeepkaur,
@amandeepkaur wrote:
how are we gonna know the data before reading it?
Ask the person who created those Matlab files - or read the Matlab code which was used to create the files…
09-21-2020 06:10 AM
can you illustrate your answer with VI?
09-21-2020 06:19 AM - edited 09-21-2020 06:20 AM
Hi amandeepkaur,
@amandeepkaur wrote:
can you illustrate your answer with VI?
In case you are talking about my message regarding dataplugins: using the link above you will also find examples/explanations on how to use them in LabVIEW!
(Hint: Sometimes it helps to name the person you are answering to!)
09-21-2020 07:20 AM - edited 09-21-2020 07:21 AM
@amandeepkaur wrote:
can you illustrate your answer with VI?
Well, this code assumes the mat file is just 3 double precision floating point values repeated (X Y Z X Y Z X Y Z etc). Again, you need to know the format of the data in the mat file.
09-28-2020 11:40 AM
I was trying to load mat file in labview.
I used data plugin open data storage to load mat file and then read data to read the mat file.
How can I plot the data, I was unable plot the data using waveform graph. The wire b/w dataplugin read file and waveform graph couldn't connect. The error appears to be of different datatypes of both terminal i.e. waveform graph and dataplugin read file. What would be the possible solutions to make the data type of same type?
How to access the contents of mat file to use for further operation like multiplication, etc after the reading operation?
09-28-2020 11:56 AM - edited 09-28-2020 11:56 AM
Hi amandeepkaur,
@amandeepkaur wrote:
How can I plot the data, I was unable plot the data using waveform graph. The wire b/w dataplugin read file and waveform graph couldn't connect. The error appears to be of different datatypes of both terminal i.e. waveform graph and dataplugin read file. What would be the possible solutions to make the data type of same type?
So there is a problem in YOUR CODE, but you only wrote some short sentences describing the problem with very generic words.
Maybe it would make sense to attach YOUR CODE so we can determine the problem and help you to remove it?
(Btw. attaching images of code is usually considered the same as attaching no code…)
The other possible solution would be to debug YOUR CODE by YOU…
@amandeepkaur wrote:
How to access the contents of mat file to use for further operation like multiplication, etc after the reading operation?
You access the content by reading the data into wires of the correct datatype…