LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab code much slower in Labview MatlabScript than in Matlab

I was using an algorithm written in Matlab that executed in less than 2 seconds. Now I need to use it within a Labview program and I am using Matlab script with the same algorithm, but it lasts 10 times longer than in Matlab. Is this normal? Thank you!

0 Kudos
Message 1 of 2
(2,311 Views)

How do you know that it is 10 times? Did you create a benchmark?

What are the conditions for the benchmark? Can you provide the code for it?

 

I am asking this because if you create the VI and put the m-script in the script node, and then press run (looking on the watch) and wait for the VI to finish, you "benchmarked" compile times, memory allocation as well as the complete VI's execution (including the script node of course). I doubt that this will ever be comparable to the "benchmark" in MatLab.

 

If you provide your VI, we might also be able to give some hints to increase performance.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 2
(2,301 Views)