LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

fsolve_zero performance issues

I am trying to implement HIL testing using a model imported into Mathscript from Matlab.   However after changing from Matlab to Mathscript, I am experiencing very poor performance.  After changing my function calls from fzero in Matlab to fsolve_zero in Mathscript I had an extreme slowdown.   Using tic/toc, I found that the mathscript solver takes about 800 ms compared to 40 ms for the first call and 1 ms for each following call in Matlab.   Because of limitation in Mathscript, I had to use global variables to pass parameters to the functions, but both Mathscript and Matlab used the same global variable calls.  

 

By taking 800x longer, the implementation become unusable.  Has anyone else experienced similar issues?   Any performance tips while using fsolve_zero?  

 

-Jon

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

Hi Jon,

 

That might just be expected performance.  If you want, though, I can benchmark it for you. If you'll post your code and let me know what software versions you're using, I can give you a better idea of what you can expect and in what ways it's practical to use it.

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