Re: Problem with double for loop... help!
- From: altenbach <x@xxxxxxxx>
- Date: Thu, 29 Sep 2005 19:40:08 -0500 (CDT)
As Chaos said, A 2D array must have the same lenght for all rows. NaN is a good idea and you can just check for its presence in the later code to determine the end of the current trace.
However, you should generate the NaNs at the beginning. Replacing zeroes with NaNs after the calculation can accidentally wipe legitimate zeroes. ;)
I have made a quick modification that also shows some simplifications to your code.
- Don't use formula nodes for simple add or multiply. LabVIEW is graphical!
- Same for the big formula. Use wires, no FOR loop needed here! :D
- If you want to index element i and element i+1, grow the node and wire i to the first terminal. The second output will be i+1. Isn't that nice? :D
- Don't use local variables in a case like this. They break dataflow.
- Use In "Range and Coerce" instead of multiple comparisons.
See attached example (LAbVIEW 7.1). Let me know if you have questions. :)Message Edited by altenbach on 09-29-2005 05:24 PM
example_MOD3.vi:
http://forums.ni.com/attachments/ni/170/145034/4/example_MOD3.vi
.
- Follow-Ups:
- Re: Problem with double for loop... help!
- From: Fonsi
- Re: Problem with double for loop... help!
- References:
- Problem with double for loop... help!
- From: Fonsi
- Problem with double for loop... help!
- Prev by Date: Re: error while saving some default value in excel file
- Next by Date: Re: Hardware Timed Single Point Data Acq with PCI-6143
- Previous by thread: Problem with double for loop... help!
- Next by thread: Re: Problem with double for loop... help!
- Index(es):