02-26-2012 08:50 PM
I have builded two similar VI. just as below.
in this VI, i add two for loops.
in this VI, i remove the two for loops.
after doing these, i run the two VI, and i have got the same result. why ?
i may not understant how "for loop" works.
i appreciate your help!
02-26-2012 09:16 PM
Hi there, a couple thoughts:
1. This questions is more appropriate for the LabVIEW Discussion Forum http://forums.ni.com/t5/LabVIEW/bd-p/170
2. You can also search for for loop information, some results answer the question. http://search.ni.com/nisearch/app/main/p/bot/no/ap/global/lang/en/pg/1/q/for%20loop/
The code is functionaly equivalent. The fundamental mathematical operations (multiply, divide, absolute power, etc) are smart enough to work on arrays as well as scalars. So your multiply by 100 is done on all elements of your 2D array, the second version is just simpler to read and implement.
I would strongly recommend some of the free training and information at NI.com:
http://www.ni.com/gettingstarted/
Also, get the LabVIEW for Everyone book:
http://www.amazon.com/LabVIEW-Everyone-Graphical-Programming-Easier/dp/0132681943
And check out your local user groups, free seminars, etc.
Thanks,
Matt