LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems of load and toolbox compatibility in Mathscript

Hi all,

 

I encountered some problems working with Mathscript.  After setting the default path, the call of sub .m functions in the node is successful. However, if inside the called .m function I 'load' another txt file, it could not be execute by labview anymore. How am I gonna solve this?

Besides, I heard from a senior engineer that Mathscript doesn't not support Matlab functions with the use of toolboxes, is it true?  If yes, how should I integrate Matlab function with use of 'toolbox' and 'load'?

 

I realized that there was another 'MATLAB script' node which requires a copy of Matlab to execute the functions. I tried this option as well. But it's weird that there're only a few IO types. I could not choose 'boolean'(as what I did with Mathscript) as my output... (my output variable is equal to either 1 or 0. It is recognized as boolean automatically when I worked with Mathscript.)

 

Can someone give me some advice on this? I'll appreciate your help a lot.

 

Cheers,

Nicholas 

0 Kudos
Message 1 of 5
(2,690 Views)

The current folder path is getting changed by opening the other file?

 

What if you don't rely on default paths and fully qualify the path to the file?

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

Hi Ravens,

 

The folder is not changed. The .txt file to be loaded is also in the default path.

 

What do you mean by fixing the path? Do you mean code the path in Matlab function when loading?

 

Cheers,

Nick 

0 Kudos
Message 3 of 5
(2,678 Views)

Hi SSR_Nicholas,

 

What do you mean by 'load' a txt file? Do you use the MathScript function 'load' or 'fread'?

0 Kudos
Message 4 of 5
(2,672 Views)
Yes.  I mean use the full path to the file.
0 Kudos
Message 5 of 5
(2,665 Views)