Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

LabVIEW MathScript Example Gallery

8 ratings | 4.25 out of 5
Read in | Print

Overview

This site contains a multitude of LabVIEW MathScript examples. These examples explore some of the features and functions of LabVIEW MathScript. They also demonstrate the integration of textual MathScript .m file script programming with LabVIEW graphical dataflow programming. Please visit www.ni.com/mathscript for more information on LabVIEW MathScript.

Note: Some of these examples include .m files with the relevant algorithm. However, the MathScript Node in the example VIs below should already have the proper m-file script loaded.

NI Example Code

  • Quiver and 3D Contour Plots in the MathScript Window: demonstrates the advanced plotting capabilities of MathScript. Using the MathScript node, users can display a 3D Contour plot and a Quiver plot in pop-up windows. This code can be used in a MathScript Node or in the MathScript Window using the Contour and Quiver Plot.m script.
  • Smoothing Algorithm using MathScript: Using this example, you can interactively change a text-based smoothing algorithm and observe its effects. A noisy signal is generated and passed through a MathScript Node with the smoothing algorithm loaded. The results are viewable on the interactive LabVIEW front panel in 3D graphs.
To view a demonstration of this example, view the MathScript Node Demo.
  • Amplitude Modulation (AM) using MathScript: In this example, a carrier signal and message signal are amplitude modulated to create an AM signal, using MathScript. The phase and frequency of the carrier and message signals can be modified on the fly, while the resulting AM signal is updated immediately.
You can also change the modulation index and see its effects on the modulated signal to give you a better understanding of this modulation technique.
  • Edge Detection (Threshold) using MathScript: This example demonstrates using MathScript to do basic image processing. Threshold technique is used to detect the edges of an image. The threshold data is displayed in a front panel graph.
  • Exponential Decay (Signal Reshaping) using MathScript: This example synthesizes a sine wave using a LabVIEW Express VI. The generated signal is then reshaped by multiplying it by a decaying exponential using a MathScript Node. This is similar to fading an acquired audio signal. Also, interactive cursors and annotation features of LabVIEW graphs are explored.

Application Notes and Tutorials

Technical Presentations


8 ratings | 4.25 out of 5
Read in | Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).