Fixed-Point Blockset | ![]() ![]() |
Update obsolete fixed-point blocks from previous Fixed-Point Blockset releases to current fixed-point blocks
Syntax
fpupdate('model')
fpupdate('model',blkprompt)
fpupdate('model',blkprompt,varprompt)
fpupdate('model',blkprompt,varprompt,muxprompt)
fpupdate('model',blkprompt,varprompt,muxprompt,message)
Description
fpupdate('model')
replaces all obsolete fixed-point blocks contained in model
with current fixed-point blocks. The model must be opened prior to calling fpupdate
.
fpupdate('model',blkprompt)
prompts you for replacement of obsolete blocks. If blkprompt
is 0 (the default), you will not be prompted. If blkprompt
is 1, you will have these three options:
y
(default) replaces the block.
n
does not replace the block.
a
replaces all blocks without further prompting.
fpupdate('model',blkprompt,varprompt)
gives you the option of updating variables that appear in each block's dialog box with their actual numerical values. Note that such an update is possible only if the variables can be evaluated in the MATLAB workspace. If varprompt
is 1 (the default), you are prompted for each variable found in the block diagram. If varprompt
is 0, all variables are automatically updated without prompting.
fpupdate('model',blkprompt,varprompt, muxprompt)
allows you to update the input size parameters of the Mux and Demux blocks found in model
. The input sizes of these blocks may need to be updated to account for the mismatch between the old and new fixed-point data representations. In the old representation, each number had a width of 2. In the new representation, each number has a width of 1. To update Mux and Demux blocks that have only fixed-point inputs, the vector that specifies the input size should be divided by 2. If muxprompt
is 1 (the default), each Mux and Demux block found in model
is updated. If muxprompt
is 0, the Mux and Demux blocks are automatically updated without prompting.
fpupdate('model',blkprompt,varprompt,muxprompt,message)
allows you to show or suppress any warning or update messages generated during the update process. If message
is 1 (the default), all messages are displayed. If message
is 0, all messages are suppressed.
fpupdate
calls addterms
to terminate any unconnected input or output ports by attaching Ground or Terminator blocks, respectively.
Example
To see how fpupdate
works, convert the obsolete model fixpoint/obsolete/fpex1.mdl
:
![]() | float | fxptdlg | ![]() |