Main Content

addInputData

Add input data

Syntax

cgvObj.addInputData(inputName, inputDataFile)

Description

cgvObj.addInputData(inputName, inputDataFile) adds an input data file to cgvObj. cgvObj is a handle to a cgv.CGV object. inputName is a unique identifier, which cgvObj associates with the input data in inputDataFile.

Input Arguments

inputName

inputName is a unique numeric or character identifier, which is associated with the input data in inputDataFile.

inputDataFile

inputDataFile is an input data file, with or without the .mat extension. cgvObj uses the input data when the model executes during cgv.CGV.run. If the input file is in the working folder, the cgvObj does not require the path. addInputData does not qualify that the contents of inputDataFile relate to the inputs of the model. Data that is not used by the model will not throw a warning or error.

Tips

  • When calling addInputData you can modify configuration parameters by including their settings in the input file, inputDataFile.

  • If you omit calling addInputData before executing the model, the cgv.CGV object runs once using data in the base workspace.

  • The cgvObj uses the inputName to identify the input data associated with output data and output data files. cgvObj passes inputName to a callback function to identify the input data that the callback function uses.