07-22-2005 01:01 PM
07-22-2005 01:02 PM
One last thing: I have attached in this file the data set of a test...
NM
07-22-2005 01:39 PM - edited 07-22-2005 01:39 PM
Message Edited by John Rich on 07-22-2005 01:40 PM
07-22-2005 02:27 PM
I like the extensive annotations, but your code makes little sense to me. In addition to what John Rich said, could you explain the purpose of the two FOR loops? You basically rattle through 150 elements just to read one element. (???)
(1) If you really need the FOR loops, you can combine them into one. You also duplicate operations for column 3, this needs ot be done only once, you can split the result later
(2) In this particular case, you can delete both FOR loops and wire 149 to the row inputs of the index array functions. Same result, <1% of the CPU load!
(3) Please match the data types of the indicators to the data type of the wires. Since you later need matrix operations where everything needs to be DBL, maybe you should initialize your array with DBL zeroes instead of I32, and make the blue 2D array orange.
(4) Instead of ANDing all the "not equals", you could OR the equals. Compare your test number with an array of test values, then OR the array elements. It makes the diagram easier to read.
(5) Notice that you can resize "index array". One single long index array node can replace the entire lower right part of your diagram. 🙂
07-22-2005 02:53 PM
07-25-2005 09:15 AM
07-25-2005 10:18 AM
07-25-2005 12:00 PM - edited 07-25-2005 12:00 PM
Message Edited by Nicholas on 07-25-2005 12:05 PM
07-25-2005 12:06 PM
07-25-2005 12:10 PM
@Nicholas wrote:
Additionally, I think the problem is that I am indeed getting an array from my FOR loop that is just a single element--the loop is not taking each of the iterations and sending that value through the loop... does anyone know how I could modify my code to make this be the case?
OK, this does not make sense. You are currently NOT getting an array from your FOR loop.
To do so, rIght-click on the desired tunnels and "enable indexing".