LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

Mathscript loading .mat files leaves no variables

Have problems loading either .txt ( ascii, double tabs) and .mat files into Mathscript command window or script window.  Get consistent error messages that I need Dataplugins...have downloaded every thing I can find and nothing helps.  If the .mat appears to load it says Mat 5.0 and leaves no data variables in the workspace.  Also get error message about GBIP not present,what does that have to do with anythink?
 
Any ideas are warmly welcomed,
 
 
CEK
0 Kudos
Message 1 of 9
(9,402 Views)
Hi Cek,
 
MathScript is unable to load .txt file directly. For .mat, only those saved with -v6 option can be loaded into MathScript. Note also that only the variables in 2D array can be loaded. Currently, MathScript does not support structure or cell array.
 
If you can attach your .mat file, I can look into the problem.
0 Kudos
Message 2 of 9
(9,399 Views)
Great here is a typical .mat file

I appreciate the help,

CEK
0 Kudos
Message 3 of 9
(9,386 Views)

Hi Cek,

When I tried to load your .mat file, I got the following head information.

MATLAB 5.0 MAT-file
Platform: MACI
Created on: Sat Mar 22 09:00:11 2008

It seems that MathScript can not recognize the MACI platform and returns nothing. I do not know what's the meaning of MACI. Maybe Mac Intel, I guess. Anyway, I will report this problem.

The workaround is to change the platform to MAC2. You can modify the .mat file by any text editor, such as Notepad++. MathScript can read the .mat file with platform MAC2. I tested it and got a 442-by-512 double array from your file. You can find the modified .mat file in the attached archive. Please try and validata it.

As to the .txt file, MathScript support the function textread. If it does not work, you can try fread. I can also look into it if you can provide a sample file.

Feel free to let me know if you encounter any problems.

0 Kudos
Message 4 of 9
(9,375 Views)

HI ttrr,

 

I now am using a workaround to avoid needing to load .txt or .mat files, by switching over to .tdms files logges via SE.  This is much cleaner.  But thanks for your advise.

 

CEK

0 Kudos
Message 5 of 9
(9,358 Views)
Hi Cek,
 
It is great to hear that you have a workaround for this problem. MathScript is also able to read and write TDM(S) file.
 
Would you please do me a favor to verify whether MACI means Mac Intel and the correctness of data loaded from MathScript? Thanks in advance!
0 Kudos
Message 6 of 9
(9,352 Views)

Hi ttrr,

 

yes the modified mat file reads in perfectly.  Thanks, your time, efforts, and skills are appreciated.

 

cek

0 Kudos
Message 7 of 9
(9,335 Views)

Hi ttrr,

 

Yes I am using a Imac, Intel running XP under Bootcamp/VMfusion.  And yes the data is correct.

 

cek

0 Kudos
Message 8 of 9
(9,334 Views)
Hi Cek,
 
It sounds good to me. Thanks!
0 Kudos
Message 9 of 9
(9,327 Views)