To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example will take a 1D array and then pull out the 20th sample of data from that array, creating a new array with the filtered data. A possible use case would be if you collected more data than you need and would like to filter the data by only taking the nth sample of the data already generated.
Description
Within this code the first For loop generates a 1000 element array that counts from 0-1000. If you already have an array you can replace the For Loop with your array data.
The second For loop then generates the new array if it is on the 20th sample. The 20 constants can be changed for what Nth sample you would like to take is. The program will then take that data point and send it to a new array.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.