Example Code

Generate Linearly Spaced Array using LabVIEW

Code and Documents

Attachment

Overview: Generate array with equally spaced array elements.

 

Description: The example gets the difference between the two Maximum (end) and Minimum (start) then divides the difference on the number of samples needed. Then it generates a 1D array of all the elements within the Minimum and Maximum values including the start and end values. The code also checks if the inputs are valid or not.

 

Requirements: LabVIEW Base Development System 2012 or compatible. 

 

Steps to Implement or Execute Code:

  1. Enter the Minimum value (start value)
  2. Enter the Maximum value (end value)
  3. Enter the Number of samples (number of elements)
  4. Run the VI

 Additional Information or References

VI Code Snippet

2036.png 

 

**The code for this example has been edited to meet the new Community Example Style Guidelines.**

Regards,
Dan King

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Gab008
Member
Member
on

Same Functionality will provide by "Ramp Pattern.vi"

Kuddo welcomed
CLAD-CTD