Rebuild generated code from model
rtwrebuild() assumes that the current working folder is
the build folder of the model (not the model location) and calls
codebuild. If the current working folder is not the build
folder, the function exits with an error.
codebuild to recompile
files you modified since that build. Operation of this function depends on the
current working folder, not the current loaded model. If your model includes
codebuild recompiles code for all models
in the hierarchy.
In Parallel Computing Toolbox™ commands, for example, a
loop, do not invoke
slbuild commands that build models that are configured for parallel
builds. For information about parallel builds of referenced models, see Reduce Build Time for Referenced Models by Using Parallel Builds.
Rebuild Code from Build Folder
codebuild and recompile code when the
current working folder is the build folder. For example,
If the model name is
And, if the model build was initiated in the
And, if the system target is GRT
Rebuild Code from Parent Folder of Build Folder
When the current working folder is one level above the build
codebuild to recompile code.
Rebuild Code from a Folder
Recompile code from a current folder by specifying a path to
the model build folder,
model — Model object or name for which to regenerate code or rebuild an executable image
Model for which to regenerate code or rebuild an executable image, specified as an object or a character vector representing the model name.
path — Model path object or fully qualified path to the build folder for the model for which to regenerate code or rebuild an executable image
Introduced in R2009a