From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

running a user-defined function in mathscript node

For MathScript RT, a general guideline to improve performance is NOT to use for loop, especially nested for loop. Alway try to change for loop into vector operation. You probably could use find to replace the for loop in your code, for example

 

d(find(S>=1)) = 255;

Message 11 of 12
(3,214 Views)

hello,

Thank you...i'll try it out...i was also wondering whether it would be better if i implemented find function in the node to get d image or simply output the S image and compute the d image in labview using maybe a threshold function?

0 Kudos
Message 12 of 12
(3,210 Views)