IRIS Toolbox Reference Manual

model

Create new model object based on model file

Syntax

M = model(FName,...)
M = model(M,...)

Input arguments

Output arguments

Options

Description

Loading a model file

The model function can be used to read in a model file named fname, and create a model object m based on the model file. You can then work with the model object in your own m-files, using using the IRIS model functions and standard Matlab functions.

If fname is a cell array of more than one file names then all files are combined together in order of appearance.

Re-building an existing model object

The only instance where you may need to call a model function on an existing model object is to change the 'removeLeads=' option. Of course, you can always achieve the same by loading the original model file.

Example

Read in a model code file named my.model, and declare the model as linear:

m = model('my.model','linear',true);

Example

Read in a model code file named my.model, declare the model as linear, and assign some of the model parameters:

m = model('my.model','linear=',true,'assign=',P);

Note that this is equivalent to

m = model('my.model','linear=',true);
m = assign(m,P);

unless some of the parameters passed in to the model fuction are needed to evaluate if or !switch expressions.