<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic For loop arrays in LabVIEW</title>
    <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322338#M166360</link>
    <description>&lt;DIV&gt;Is there any way to get rid of the first value that the for loop puts into the auto indexed array? I am taking the average of the array elements but the first element is always invalid. Can I get rid of the first element before or after the array is created?&lt;/DIV&gt;</description>
    <pubDate>Wed, 08 Feb 2006 20:48:40 GMT</pubDate>
    <dc:creator>b_lee</dc:creator>
    <dc:date>2006-02-08T20:48:40Z</dc:date>
    <item>
      <title>For loop arrays</title>
      <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322338#M166360</link>
      <description>&lt;DIV&gt;Is there any way to get rid of the first value that the for loop puts into the auto indexed array? I am taking the average of the array elements but the first element is always invalid. Can I get rid of the first element before or after the array is created?&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2006 20:48:40 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322338#M166360</guid>
      <dc:creator>b_lee</dc:creator>
      <dc:date>2006-02-08T20:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: For loop arrays</title>
      <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322341#M166362</link>
      <description>You could use the array subset vi.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2006 20:50:58 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322341#M166362</guid>
      <dc:creator>daijoubu</dc:creator>
      <dc:date>2006-02-08T20:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: For loop arrays</title>
      <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322343#M166364</link>
      <description>&lt;DIV&gt;You could also built your array in a shift register and have the built array node in a case structure that is only ON when desired.&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2006 20:55:13 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322343#M166364</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2006-02-08T20:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: For loop arrays</title>
      <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322346#M166365</link>
      <description>&lt;P&gt;I was just wondering..By invalid do you mean the first element is not a number or you just want to ignore the first element while calculating the average..in any case you can still use the Array subset vi.&lt;/P&gt;
&lt;P&gt;-Prashant.&lt;/P&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2006 20:58:09 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322346#M166365</guid>
      <dc:creator>pacific</dc:creator>
      <dc:date>2006-02-08T20:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: For loop arrays</title>
      <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322349#M166366</link>
      <description>I mean that the first number for some reason is an off reading...and&amp;nbsp;I dont have&amp;nbsp;time&amp;nbsp;to find out why so I would much rather ignore it. Thanks for the help Fellas.
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2006 21:01:03 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322349#M166366</guid>
      <dc:creator>b_lee</dc:creator>
      <dc:date>2006-02-08T21:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: For loop arrays</title>
      <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322353#M166369</link>
      <description>&lt;DIV&gt;Here's an example showing three possibilities to skip element # zero (LabVIEW 7.0):&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2006 21:08:57 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322353#M166369</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2006-02-08T21:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: For loop arrays</title>
      <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322354#M166370</link>
      <description>For bonus points (and to help me learn)...&lt;BR /&gt;What are the advantages of each method Altenbach?&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2006 21:14:24 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322354#M166370</guid>
      <dc:creator>daijoubu</dc:creator>
      <dc:date>2006-02-08T21:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: For loop arrays</title>
      <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322359#M166374</link>
      <description>"Trimmed" is the easiest.&amp;nbsp; Easiest to wire.&amp;nbsp; Easiest to read.&amp;nbsp; A little wasteful, because you created one more value than you actually needed.&amp;nbsp; However, you do not need to know a piori how many instances you need.&lt;BR /&gt;&lt;BR /&gt;"Built" is the least efficient in memory and speed.&amp;nbsp; You will not notice much of a difference in such a small array, but you will get killed in larger ones.&amp;nbsp; It does have a small advantage in not using the invalid first datum.&amp;nbsp; Similar to "trimmed", you do not need to know ahead of time how many data values are involved.&lt;BR /&gt;&lt;BR /&gt;"Replaced" is the most memory and speed effienct.&amp;nbsp; You do have to know exactly how big an array to build beforehand.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2006 21:28:03 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322359#M166374</guid>
      <dc:creator>jasonhill</dc:creator>
      <dc:date>2006-02-08T21:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: For loop arrays</title>
      <link>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322366#M166377</link>
      <description>&lt;DIV&gt;Well, the top method would get complicated very quickly once you want to drop random element positions. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The other two methods depend a bit on the circumstances:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The middle method is simple and "good enough" for small arrays. It is preferred if the output array is only very small (i.e. only a small percentage of elements are kept)&lt;/DIV&gt;
&lt;DIV&gt;The bottom method is probably most efficient for very large arrays. It would need to be modified a bit for random element skips. Easiest would be to allocate the same size as N of the loop, then trim the output to the size of the lower (blue) shift register after the loop.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;If this is critical code, you should test various version and see which one is best for your particular scenario.&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Feb 2006 21:37:48 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/For-loop-arrays/m-p/322366#M166377</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2006-02-08T21:37:48Z</dc:date>
    </item>
  </channel>
</rss>

