Documentation Center    • Trial Software   • Product Updates
Estimating Nonlinear Grey-Box Models  Specifying the Nonlinear
Grey-Box Model Structure  You must represent your system as a
set of first-order nonlinear difference or differential
equations:  where for continuous-time representation and for
discrete-time representation with Ts as the sampling interval. F
and H are arbitrary linear or nonlinear functions with Nx and Ny
components, respectively. Nx is the number of states and Ny is
the number of outputs.  After you establish the equations for
your system, create a function or MEX-file. MEX-files, which can
be created in C or Fortran, are dynamically linked subroutines
that can be loaded and executed by the MATLAB® interpreter. For
more information about MEX-files, see MEX-File Creation API.
The purpose of the model file is to return the state derivatives
and model outputs as a function of time, states, inputs, and
model parameters, as follows:  [dx,y] = MODFILENAME(t,x,u,p1,p2,
...,pN,FileArgument)