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

load (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the support class.

Syntax

load

load file

load file a, b, ..., c

Description

Loads variables from a file. load and load file load all variables from a file. load file a, b, ..., c loads variables a, b, ..., c from a file. You can specify an unlimited number of variables to load. You must use the save function to save variables to a file before you can load those variables with the load function.

The file string can be an absolute path or a path relative to the current working directory. If you do not specify file, LabVIEW loads the variables from the default.mlv file in the current working directory.

Details

Examples

Details

You can use the load function in the following situations:

  • To load variables from a .mat file you saved using the MATLAB® software.
  • To load channel data from a binary measurement file (.tdm or .tdms) you saved using NI software, such as LabVIEW or DIAdem. If you saved the file using LabVIEW MathScript, LabVIEW loads each channel group from the file as a matrix variable. The name of the channel group determines the name of the variable. If you did not save the file using MathScript, LabVIEW loads each channel from the file as a matrix variable. The name of the channel determines the name of the variable.
  • To load data from an external data file, such as a .csv or .mdf file. To load data from an external data file, you first must install the correct National Instruments DataPlugins. Refer to the National Instruments Web site to download DataPlugins.
Changes you make to the working directory using the cd function apply only to the current instance of the LabVIEW MathScript Window or the MathScript Node from which you call the function. Changes to the working directory for one MathScript Node do not apply to any other MathScript Nodes. LabVIEW resets the working directory to the default when you close the LabVIEW MathScript Window or when the MathScript Node stops executing. Use the MathScript: Search Paths Options page to change the default working directory.

If you call this function from a MathScript Node or a user-defined function, a warning glyph appears on the MathScript Node frame. The warning glyph indicates that LabVIEW operates with reduced error checking and slower run-time performance for the MathScript Node. To improve the error checking and optimize the performance of the MathScript Node, remove this function from scripts and user-defined functions. Also, do not change the MathScript search path list at run time. Instead, use the MathScript: Search Paths Options page to configure the default search path list.


This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.

Examples

clear all
A = 12
save
clear all
load
B = A+1

Related Topics

cd
pwd
save


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit