Example Programs

Showing results for 
Search instead for 
Did you mean: 

Three Ways to do Mathematical Analysis in LabVIEW


This document shows three ways to do a simple mathematical analysis using LabVIEW.  The three methods shown in this example are:

  • Using the LabVIEW Math libraries (simple example ODE LabVIEW.vi)
  • Using MATLAB Script Node (simple example ODE MATLAB.vi)
  • Using MathScript Node (simple example ODE MathScript.vi)


If you are interested in a comparison of some of these methods, particularly to see the differences between using the MATLAB Node and the MathScript Node, see this page: Moving to MATLAB Script Nodes from MathScript Nodes in LabVIEW


Hardware and Software Requirements

Required software for Windows:

  • LabVIEW 2018 (32-bit) or later
  • LabVIEW MathScript Module (32-bit) or later
  • MATLAB 2018a or later

No hardware required.


Steps to Implement or Execute Code

Installing the examples and setting the path in MATLAB:

Place the following three example benchmark VIs and supporting script (from the Example Benchmarks for MATLAB Script and MathScript zip file) into the Documents > LabVIEW Data folder on your Windows computer:

  • simple example ODE LabVIEW VI
  • simple example ODE MATLAB VI
  • simple example ODE MathScript VI
  • secondord.m

Also make sure that you add the path for the LabVIEW Data folder to your MATLAB environment on the same machine.


Running the example VIs:

You can run each example VI and observe the results.


Additional Information or References

MATLAB Script node

MathScript Module