LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass a string to Matlab

Hi,

I'm trying to pass a string from Labview to a Matlab script node so that
matlab may open a the file named in the string. Does anyone have any ideas
as to how to do this?

Thanks!

Brad.

PS I tried converting the string to a byte array and passing it - but I
can't work out how to convert it back from a byte array into a string in
Matlab.
0 Kudos
Message 1 of 3
(3,192 Views)
You can use char(x) to convert the byte array x into astring in Matlab.

Good Luck.

Nx
0 Kudos
Message 2 of 3
(3,192 Views)
try using the "char" command in matlab

Brad wrote:

> Hi,
>
> I'm trying to pass a string from Labview to a Matlab script node so that
> matlab may open a the file named in the string. Does anyone have any ideas
> as to how to do this?
>
> Thanks!
>
> Brad.
>
> PS I tried converting the string to a byte array and passing it - but I
> can't work out how to convert it back from a byte array into a string in
> Matlab.
Message 3 of 3
(3,192 Views)