ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

matlab mathscript textread

Hi all,

 

I'm using labview 8.6. I'm trying to use mathscript node (putting matlab code) into my labview program. I need to import a .txt file into my mathscript. However, I found out that in mathscript node of the labview, it does not support the syntax of "textread" in which I need to import my .txt file and it is commonly used in matlab to import the file.

Is there any solution for this problem?

I have attached my program.

 

Thank you.

0 Kudos
Message 1 of 5
(3,229 Views)
Anyone can help me? Please... Thanks alot.
0 Kudos
Message 2 of 5
(3,207 Views)

MathScript is not designed to be a 100% replacement for Matlab. There will be functional differences. You've found one, and must account for it. The documentation for that function indicates that it requires a minimum of two parameters:

 

Syntax

[a, b, ...] = textread(file, format)

[a, b, ...] = textread(file, format, size)

 

Thus, you must specify the format.

0 Kudos
Message 3 of 5
(3,190 Views)

Thank you=)

0 Kudos
Message 4 of 5
(3,161 Views)

Can you please give an example of "how to read a .lvm file having double values".

 

If possible then please mention proper syntax.

 

Thanks.

 

 

0 Kudos
Message 5 of 5
(2,764 Views)