ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the TIC-TOC elapsed time from Mathscript Node?

Hello,

I have this simple question but I don't know how to solve it.

Inside the Mathscript node, as an example, I have:

tic
for i = 1:1000
a = sqrt(2);
end
toc

Now, I want as output the elapsed time of the tic-toc.. How can I get this time?

Thank you very much in advance.

Ricardo.
0 Kudos
Message 1 of 3
(3,192 Views)
Try something like b=toc instead of just the line toc to assign b the value of the toc function. Then declare b an output variable on the node.

Message Edited by Jarrod S. on 01-09-2007 12:07 AM

Jarrod S.
National Instruments
0 Kudos
Message 2 of 3
(3,184 Views)
Thanks Jarrod 😉

I solve it in the Matlab way... Because I didn't know that the elapsed time was returned as an answer.

elapsedTime=ans;
elapsedTime


0 Kudos
Message 3 of 3
(3,170 Views)