Viewpoint Systems, Inc.
800 West Metro Park
Rochester, NY 14623
Phone: 585.475.9555
Fax: 585.475.9645
Viewpoint Data Management, LLC.
800 West Metro Park
Rochester, NY 14623
Phone: 585.475.9555
Fax: 585.475.9645
Viewpoint News, Winter 2008Want to win a $50 gift certificate? Take the Viewpoint Systems LabVIEW Code Challenge. This issue’s challenge is: Remove all the negative values from a very large array.
Last issue’s winner: Andy Reding of GW Lisk in Clifton Springs, NY. Andy’s solution converted the alphabet characters to ASCII codes and he used these codes as indices into the substitution array to lookup the replacement letters. This is very fast. Nice.
The challenge is to write LabVIEW code that takes an array as input and discards all values less than zero. The output should be the concatenation of all values greater than or equal to zero.
To test the effectiveness of this code, run this code on the 10M point sine wave. Specifically, generate an array 10,000,000 data points in length containing a sine wave with amplitude equal 1, with 1000 points per cycle, and 10000 cycles. Use a double precision array instead of a waveform datatype to store the sine wave.
After processing this 10M point array, an output array of around 5M points will remain, formed from the consecutive positive half cycles of the sine wave.
The winner of this Code Challenge will be the developer of code that processes this large sine wave in the least time. For comparisons, all submitted code will be compiled into LabVIEW 8.5 and run on the same computer with 1GB RAM.
Please submit your solution (via email) as a ZIP file (with no password, please).]