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: 

Put a signal from labview into .mat file

Hi,

 

I have this block diagram that I took from a discussion about sEMG signal but I need to put the simulated signal or spectrum function into .mat file to open it in Matlab.

 

What software do I need ? 

 

I've Labview 2010 but I don't know how take the output signal to save 

 

I've red something about Matlab dataplugin and I've downloaded it, but in system requirements there are other applications (like  DIAdem Development System 10.2, NI DataFinder Server Edition 2.1, LabVIEW DataFinder Toolkit 2009 )

 

 

Thanks

0 Kudos
Message 1 of 4
(2,665 Views)

Hello escape, 

 

I think that the following link will help you a lot. It also contains an example.vi that will help you save your output signal in a mat file. Just take the desired signal and put it as an input in the Write Data Channel. This will do the work.

 

http://digital.ni.com/public.nsf/allkb/FBA2EAE2AB27BDEA862575D900724BDD?OpenDocument

 

 

Antonios
0 Kudos
Message 2 of 4
(2,641 Views)

Thanks Antonios for reply,

 

I've tried to run LabVIEW Write To MAT LV86.vi  but it returns me this error:

 

LabVIEW:  The object refnum is invalid. The node that returned this refnum might have encountered an error and did not return a valid refnum. The storage this refnum refers to might have closed before the call executed.

0 Kudos
Message 3 of 4
(2,639 Views)

An even simpler way is to follow the instructions of this article.

 

http://digital.ni.com/public.nsf/allkb/2F8ED0F588E06BE1862565A90066E9BA?OpenDocument

 

You can save the data of your signal in ASCII format in LabVIEW using the Write To Spreadsheet File VI on the Programming»File I/O palette and then you can open this file in Matlab environment by typing

 

>>LOAD filename

 

In this way you will be able to read your Data in Matlab.

 

In the link above you can find also instructions on how to interact between Labview and Matlab environment.

 

 

Antonios
0 Kudos
Message 4 of 4
(2,614 Views)