I would like to know how i can save an byte array to a mat file format (matlab file format '*.mat') within to use the matlab API

So, I search the binary matlab file format('*.mat').

Title:
Moving Data Between MATLAB® and LabVIEW
Problem: 
How can I share data between LabVIEW and the MATLAB environment?
Solution: 
MATLAB users can move data between the
MATLAB environment and LabVIEW, you have several options. Prior to
LabVIEW 5.1, the only way to transfer data between these two
environments was to use the Save and Load functions. Those are discussed herein.
Beginning
in LabVIEW 8.0, MathScipt was introduced. MathScript is an integrated
part of LabVIEW that you can use to combine intuitive graphical
dataflow programming with math-oriented textual programming. See the
attached links below for more information on MathScript.
Beginning
in LabVIEW 5.1, the MATLAB script node was introduced into the LabVIEW
programming environment. The MATLAB script node makes ActiveX calls to
the MATLAB software from within LabVIEW. This requires that both MATLAB
be installed on the same machine and that a valid license is obtained.
More information on the MATLAB script node can be found in the attached
KB's.
For all versions of LabVIEW, this data transfer can be
performed by saving the data in a file using the MATLAB software and
reading it directly from LabVIEW, or vice versa. In the MATLAB
environment, the command "save" allows you to save the data in
binary format (*.mat) or ASCII format. You also have an option of
saving it in ASCII format using a tab delimiter between data points and
the command "load" allows you to read in the data.
ASCII Format
Complete the following steps to import or export data between LabVIEW and the MATLAB environment using an ASCII file format.
From the MATLAB environment to LabVIEW
To save a vector or a matrix X in tab-delimited ASCII format, enter the following in the command window or m-script file in the MATLAB environment:
>>SAVE filename X -ascii -double -tabs
This creates a file named filename containing data X in tab-delimited ASCII format.
Import the file into LabVIEW using the Read From Spreadsheet File VI located on the Functions»File I/O palette.
From LabVIEW to the MATLAB environment
To export a matrix X from LabVIEW to the MATLAB environment, first save the data in ASCII format in LabVIEW using the Write To Spreadsheet File VI on the Functions » File I/O palette.
Enter the following in the command window of the MATLAB environment, or in the m-script file:
>> LOAD filename
This reads the data into the MATLAB environment.
Binary Format
Complete the following steps to import or export data between LabVIEW and the MATLAB environment.
From the MATLAB environment to LabVIEW
As mentioned above, LabVIEW does not save multiple variables to one
data with extra manipulation, and will not be discussed here.
Therefore, the only way of sending the data from the MATLAB environment
to LabVIEW without tampering with the MAT binary file structure is
using the ASCII format. Also, please bear in mind that you need to have
one file for one variable.
From LabVIEW to the MATLAB environment
Because
the MATLAB software saves data in its own binary format, the "MAT"
file, binary LabVIEW data must be converted to this format prior to
transferring the data. The attached examples can be used to save
LabVIEW data in the MATLAB software format. The convenience of the .MAT
file format is that more than one variable can be saved in the same
file. The example shows saving seven variables to .MAT format; the
example can be modified for any number of variables.
Once this data is saved from LabVIEW, it can be read into the MATLAB environment, using the following command:
>>LOAD filename
The Who
command can then be used to display all the seven variable names, and
you can display the content of them by entering the variable names at
the command prompt as usual.
MATLAB® is a
registered trademark of The MathWorks, Inc. Other product and company
names listed are trademarks and trade names of their respective
companies.
| Michael K | Project Manager | LabVIEW R&D | National Instruments |

Similar Messages

Maybe you are looking for

  • Photoshop Elements 6 won't open RAW with XMP file.

    Hi, I searched for an answer but, could not find an answer. I edited a RAW file with Photoshop Elements 6 (mac). I saved the file and closed the program. Next day I fire up PSE6 and open the same RAW file; the file is unedited. How can I open the RAW

  • Nano gift for mother...can I set it up for her at my computer then mail it

    I just bought my mom the nano...I got mine for christmas and love it. I want to get hers set up, load some songs and then fedex it to her with an itunes gift card so she can download some songs herself. Is this possible...if I am the first person to

  • SSL: %TAC+: no address for get_server

    Hi Giles, I've been trying to setup TACACS on the two SSL Modules that we have. The config on both are the same, and so are the firmware versions: Version 12.2(11)YS1 The config used for getting TACACS to work i've used is: aaa new-model aaa authenti

  • PPOME problem

    hi we are facing one issue related to PPOME when we create and save the  new position in  PPOME the data saved successfully. Then all the employees names disappear even if  we search the employee names,we cannot see the name of the employee while we

  • FACEBOOK COLUMNS SCRAMBLE, BUT NOT IN IE.

    FB stopped displaying properly and the problem has persisted through 5, 6 and 6.02. The desktop comes up normally, but when fully loaded the leftmost column become column 3 and the desktop items are pushed down to below the friends list. I have scree