| DSP Blockset | Search  Help Desk |
Configuring Simulink for DSP Systems
When you create a new DSP model, you may want to adjust certain Simulink settings to suit your needs. A very typical change, for example, is to adjust the Stop time parameter (in the Simulation Parameters dialog box) to a different value. Another common change is to specify the Fixed-step option in the Solver options panel, to reflect the discrete nature of the DSP model. The DSP Blockset provides an M-file,dspstartup, that lets you automate this configuration process so that every new model you create is preconfigured for DSP simulation. The M-file executes the following commands:
set_param(0, ... 'Solver', 'fixedstepdiscrete', ... 'SolverMode', 'auto', ... 'StartTime', '0.0', ... 'StopTime', 'inf', ... 'FixedStep', 'auto', ... 'SaveTime', 'off', ... 'SaveOutput', 'off', ... 'AlgebraicLoopMsg', 'error', ... 'InvariantConstants', 'on', ... 'RTWOptions', [get_param(0,'RTWOptions') ' -aRollThreshold=2']);