LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reversing the order of an array

Thank you jmcbee.  I downloaded, ran, and printed your vi.  It works great!  You just boosted my moral by a whole bunch!  zapper
0 Kudos
Message 11 of 14
(992 Views)
Not a problem, to tell the truth I was aiming for a C+, slightly better than average (since I threw the notifier in there).  Zapper, while the VI I posted works it is a good example of how many ways there are to solve a problem, all ways not being equal.

Have a nice weekend


Message Edited by jmcbee on 03-14-2008 04:24 PM

Message Edited by jmcbee on 03-14-2008 04:26 PM
0 Kudos
Message 12 of 14
(992 Views)
zapper,
 
It should be noted that the solution posted by jmcbee is going to execute several orders of magnitude slower than the other two posted solutions.  If you need to reverse a very large array, or if you need to reverse a large number of arrays one after the other, then the method with queues, notifiers, and parallel loops will be extremely slow.
 
jmcbee - My hat's off to you for coming up with such a creative solution Smiley Happy
 
Chris M
0 Kudos
Message 13 of 14
(979 Views)
I'd also note that jmcbee's method runs infinitely when trying to reverse an empty array! But I suppose that operation is somewhat undefined anyways 😉
Jarrod S.
National Instruments
0 Kudos
Message 14 of 14
(960 Views)