From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Load .mat (Matlab) file on run time (.exe)

Solved!
Go to solution

 

Hello, 

 

I would like to make an application capable of reading 2 variables from a Mat file, both are double precision arrays and I know their names.

 

I have searched a lot on the Internet, both at ni and mathworks web sites, and I ended up with two problems:

 

 

  • Must be a solution that will work on any Windows machine (Matlab may not be installed);
  • Must be able to read big arrays (10.000 items at least).
 
I have attached the file. The array on the file has 300.000 elemenst but reading just the first/last 10.000 will be ok.
 
Does anyone knows how to do this?
 
Thank you verry much! 
 
 

 

 

 

Message Edited by GPC on 09-21-2009 05:29 PM
Message 1 of 6
(5,304 Views)

Hi GPC,

 

You can try the MATLAB@ DataPlugin.

 

MATLAB® is a registered trademark of The MathWorks, Inc.

0 Kudos
Message 2 of 6
(5,295 Views)
Solution
Accepted by topic author GPC

You could also use the mat-file io library, which is written in pure G and supports every data type that MATLAB supports.  There should be no problem building an executable using the library.  If you do decide to use this library, wait till the latest version is uploaded later today.  There are a couple changes that will make it easier to use.

 

Jim

 

 

I had no problem opening your mat file using the library:

 

Signal.png

Message 3 of 6
(5,276 Views)

It worked!

 

Thank you verry much (for both of you). 

 

0 Kudos
Message 4 of 6
(5,265 Views)

hi

i have same  problem

i have a mat file and want to access it in labview

your post is a pic and i cant use it.

if its posible for you upload the vi

thank you

0 Kudos
Message 5 of 6
(3,891 Views)

See if you can use this VI snippet.  Additional instructions are here:  http://sourceforge.net/apps/mediawiki/matio-labview/index.php?title=Main_Page

 

Jim

 

0 Kudos
Message 6 of 6
(3,853 Views)