Skip to content Skip to navigation

Connexions

You are here: Home » Content » LabVIEW MathScript and Hybrid Programming

Navigation

Recently Viewed

This feature requires Javascript to be enabled.

LabVIEW MathScript and Hybrid Programming

Module by: Nasser Kehtarnavaz, Philipos Loizou, Mohammad Rahman. E-mail the authors

User rating (How does the rating system work?)
Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

:
(0 ratings)

In signals and systems lab courses, .m file coding is widely used. LabVIEW MathScript is a feature of the newer versions of LabVIEW that allows one to include .m files within its graphical environment. As a result, one can perform hybrid programming, that is, a combination of textual and graphical programming, when using this feature. This chapter provides an introduction to MathScript or .m file textual coding. See (Reference) and (Reference) for advanced MathScript aspects.

MathScripting can be done via the LabVIEW MathScript interactive window or node. The LabVIEW MathScript interactive window, shown in Figure 1, consists of a Command Window, an Output Window and a MathScript Window. The Command Window interface allows one to enter commands and debug script or to view help statements for built-in functions. The Output Window is used to view output values and the MathScript Window interface to display variables and command history as well as edit scripts. With script editing, one can execute a group of commands or textual statements.

Figure 1: LabVIEW MathScript Interactive Window
Figure 1 (graphics1.png)

A LabVIEW MathScript node represents the textual .m file code via a blue rectangle as shown in Figure 2. Its inputs and outputs are defined on the border of this rectangle for transferring data between the graphical environment and the textual code. For example, as indicated in Figure 2, the input variables on the left side, namely lf, hf and order, transfer values to the .m file script, and the output variables on the right side, F and sH, transfer values to the graphical environment. This process allows .m file script variables to be used within the LabVIEW graphical programming environment.

Figure 2: LabVIEW MathScript Node Interface
Figure 2 (graphics2.png)

Content actions

Give Feedback:

E-mail the module authors | Rate module ( How does the rating system work?)

Rating system

Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

(0 ratings)

Download:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.

| A lens (?)

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks