LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Speeding up MATLAB scripts that return large arrays


Otman wrote:
As someone has written already, to run the MATLAB code, first LV has to open MATLAB and then process the code, that in it of itself is a slow process.
MATLAB opens when the VI containing the script node is opened, and the MATLAB environment then persists until the VI is closed. This is not a problem!

Running the equivalent code in LabVIEW involves a lot of Call Library Function Nodes that I have never managed to get to work to my satisfaction. It's not really an option.


Jennifer_R wrote:
The array data may be rewritten each time, but since the array size is not changing separate memory should not be allocated on each iteration. 

Just like that? I guess there's nothing else that can be done, then.

Message Edited by kehander on 12-30-2007 08:43 AM
0 Kudos
Message 11 of 12
(772 Views)
The functions are written in C so they're as fast as you can get. Try doing double integration using the MATLAB script function within LV and you'll see what I mean. Besides LV has a lot of analytical functions so you can do your analysis within LV itself therefore taking advantage of the speed of native code. I'm a fan of MATLAB but not in the context of communication within the two platforms.
0 Kudos
Message 12 of 12
(750 Views)