sldiscmdl
Discretize model that contains continuous blocks
Syntax
sldiscmdl('
model_name
',sample_time
)
sldiscmdl('model_name
',sample_time
,method
)
sldiscmdl('model_name
',sample_time
,options
)
sldiscmdl('model_name
',sample_time
,method
,freq
)
sldiscmdl('model_name
',sample_time
,method
,options
)
sldiscmdl('model_name
',sample_time
,method
,freq
,options
)
[old_blks
,new_blks
]
= sldiscmdl('model_name
',sample_time
,method
,freq
,options
)
Description
sldiscmdl('
discretizes
the model named model_name
',sample_time
)'
using
the specified model_name
'sample_time
. The model does
not need to be open, and the units for sample_time
are
simulation seconds.
sldiscmdl('
discretizes
the model using model_name
',sample_time
,method
)sample_time
and the transform
method specified by method
.
sldiscmdl('
discretizes
the model using model_name
',sample_time
,options
)sample_time
and criteria
specified by the options
cell array. This
array consists of four elements: {target
, replace_with
, put_into
, prompt
}.
sldiscmdl('
discretizes
the model using model_name
',sample_time
,method
,freq
)sample_time
, method
,
and the critical frequency specified by freq
.
The units for freq
are Hz. When you specify freq
, method
must
be 'prewarp'
.
sldiscmdl('
discretizes
the model using model_name
',sample_time
,method
,options
)sample_time
, method
,
and options
.
sldiscmdl('
discretizes
the model using model_name
',sample_time
,method
,freq
,options
)sample_time
, method
, freq
,
and options
. When you specify freq
, method
must
be 'prewarp'
.
[
discretizes
the model using old_blks
,new_blks
]
= sldiscmdl('model_name
',sample_time
,method
,freq
,options
)sample_time
, method
, freq
,
and options
. When you specify freq
, method
must
be 'prewarp'
. The function also returns two cell
arrays that contain full path names of the original, continuous blocks
and the new, discretized blocks.
Input Arguments
|
Name of the model to discretize. | ||||||||||||||||||||||||||
|
Sample-time specification for the model:
| ||||||||||||||||||||||||||
|
Method of converting blocks from continuous to discrete mode:
| ||||||||||||||||||||||||||
|
Critical frequency in Hz. This input applies only when the | ||||||||||||||||||||||||||
|
Cell array {
|
Examples
Discretize all continuous blocks in the slexAircraftExample
model
using a 1-second sample time:
openExample('slexAircraftExample'); sldiscmdl('slexAircraftExample',1);
Discretize the Aircraft Dynamics Model
subsystem
in the slexAircraftExample
model using a 1-second
sample time, a 0.1-second offset, and a first-order hold transform
method:
sldiscmdl('slexAircraftExample',[1 0.1],'foh',... {'slexAircraftExample/Aircraft Dynamics Model',... 'parammask','copy','on'});
Discretize the Aircraft Dynamics Model
subsystem
in the slexAircraftExample
model and retrieve the
full path name of the second discretized block:
[old_blks,new_blks] = sldiscmdl('slexAircraftExample',[1 0.1],... 'foh',{'slexAircraftExample/Aircraft Dynamics Model','parammask',... 'copy','on'}); % Get full path name of the second discretized block new_blks{2}
Discretize all continuous blocks in the slexAircraftExample
model using a 1-second sample time:
openExample('slexAircraftExample'); [old_blk,new_blk] = sldiscmdl('f14',1,'zoh',... {'f14/Aircraft Dynamics Model',... 'parammask','variant','on'})
--discretizing 'f14/Aircraft Dynamics Model' and putting results into a variant subsystem old_blk = 1x1 cell array {'f14/Aircraft Dynamics Model'} new_blk = 1x1 cell array {'f14/Aircraft↵Dynamics↵Model'}
Version History
Introduced before R2006a