Example Code

Math Functions for LabVIEW

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 contains three math functions not included in LabVIEW.

 

Description
           

Logarithmic Space

"Log Space.vi" will generate a logarithmically spaced array of elements equal to the Number of Samples between the Minimum and                   Maximum.

 

Gaussian Curve

"Gaussian Curve.vi" will create a Gaussian curve. This is especially useful in conjunction with the Gaussian Peak Fit VI in LabVIEW.

           

Simplify Fraction

"Simplify Fraction.vi" will simplfy the input fraction, it uses the Gcd VI, which is part of the Discrete Math VIs, installed with the Full                       Development System. This VI is especially useful when performing fractional resampling in an RF application, where unsimplified                       fractions can cause issues.

 

Requirements

  • LabVIEW 2012 (or compatible)

 
Steps to Implement or Execute Code

         

Logarithmic Space

1. Set Parameters (Min, Max and # of samples

2. Run VI

 

Gaussian Curve

1. Set Parameters
2. Run VI
"Gaussian Curve.vi" 

           

Simplify Fraction

1. Insert Denomenator Numerator
2. Run VI

 

 

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

 

Regards,
Dan King

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