LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help opening a .mat file

Hi,

 

I am new to labview and need some assistance trying to open a .mat file for further analysis (example file attached). The file formate is level 5 and I believe the data is in arrays. I do not have access to confirm the structure but have been told the layout of the data i need to access follows the following structure: MotionFile_walkaround -> Actor_50_human -> Segments -> Sacrum -> Pose.

 

I have successfully read the header and found that byte swapping is required. I have downloaded the Mat-File IO library but have had no success in reading the actual data set beyond the header but assume this is due to my inexperience with both .mat files and labview. 

 

Any help would be greatly appreciated.

0 Kudos
Message 1 of 6
(5,105 Views)

Hi doofus13
U should've included the ur vi whatever u've tried it will good to go further.

Thanks
uday
0 Kudos
Message 2 of 6
(5,088 Views)

Hi udka,

 

u ur u've is really hard to read...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(5,080 Views)
Hi GerdW,

I'm really sorry. will try to post properly from now on. Thanks for pointing.
Thanks
uday
Message 4 of 6
(5,078 Views)

Hey doofus13,

 

When reading your .mat file, created in The MathWorks, Inc. MATLAB® software, I recommend using the MATLAB® DataPlugin found here:

 

MATLAB® DataPlugin

http://www.ni.com/example/29178/en/

 

Then, you can use the Data File Viewer function to view all of the data in your file. Any data that can be seen in the Data File Viewer can then be extracted using the Data Storage API. I looked through the file you provided and was able to view and extract the data contained in the file using the Data Storage API so it should work fine for you.

 

MATLAB® is a Registered Trademark of The MathWorks, Inc.

 

Hope this helps!

 

--Ryan_S.

0 Kudos
Message 5 of 6
(5,049 Views)

You can try downloading the library at http://matio-labview.sourceforge.net/. This library will allow you to read and write .mat files.

 

You will need VIPM to install it; which if you do not have you can download it from http://jki.net/vipm.

 

If your mat files are large you may need to modify the files in the matio library, they are nicely written, but not terribly memory efficient.

 

cheers,

mcduff

0 Kudos
Message 6 of 6
(5,027 Views)