Example Code

Linear Curve Fitting a Random Waveform Graph

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 VI uses a loop structure to create a linear graph with random "noise".


Description:

This VI uses a loop structure to create a linear graph with random "noise". This is done by adding the random number generator VI to a linearly increasing y value. Once the graph is created, a linear fit VI will fit the best curve to it display it on the front panel.


Requirements: LabVIEW 2012 (or compatible), Hardware: none.


Steps to Implement or Execute Code:

1. Run the VI.
2. The results are on the graphs.


Additional Information or References: 

 

Linear Curve Fitting FP.png

 

Linear Curve Fitting sn.png


**This document has been updated to meet the current required format for the NI Code Exchange.**

Chris Van Horn
Applications Engineer

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

Comments
AllanNish
Member
Member
on

First, I'm a novice in LabVIEW programming. I opened this vi, but it's unclear to me how I input the waveform data. I think this is the vi that will fit perfectly into my program. Could anyone help?