Example Code

Create Gradient Array of Intermediate Values

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example shows how you can calculate an array of intermediate values based on a start value, end value and a specified array length. 

 

Description

The VI calculates the difference between elements to that there is a linear interpolation from start value to end value.  This can be helpful in calculating color gradients or predict missing values of a data set on a linear scale.


Requirements
LabVIEW 2012 (or Compatible)

 

Steps to Implement or Execute Code

  1. Use this VI stand alone or as a subVI
  2. Insert Start and End Values and Array length

Main VI Snippet:

Create Gradient Array LV_2012_NI_Verified.png

 

**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.