| DSP Blockset | ![]() |
| Using dspstartup.m |
Use the dspstartup M-file to preconfigure Simulink for DSP simulations. |
| Performance-Related Settings in dspstartup.m |
Understand how the settings in the dspstartup M-file improve the performance of the simulation. |
| Miscellaneous Settings |
Learn the other parameters that the dspstartup M-file adjusts to make it easier to run DSP simulations. |
When you create a new DSP model, you might want to adjust certain Simulink settings to suit your own needs. A 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-time 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, ... 'SingleTaskRateTransMsg','error', ... 'Solver', 'fixedstepdiscrete', ... 'SolverMode', 'SingleTasking', ... 'StartTime', '0.0', ... 'StopTime', 'inf', ... 'FixedStep', 'auto', ... 'SaveTime', 'off', ... 'SaveOutput', 'off', ... 'AlgebraicLoopMsg', 'error', ... 'InvariantConstants', 'on', ... 'ShowInportBlksSampModeDlgField','on', ... 'RTWOptions', [get_param(0,'RTWOptions') ' -aRollThreshold=2']);
The following sections provide information about dspstartup:
For complete information on any of the settings, see the Simulink documentation.
| ANSI/ISO C Code Generation Support | Using dspstartup.m | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |