DSP Blockset | ![]() ![]() |
Using dspstartup.m
There are two ways to use the dspstartup
M-file to preconfigure Simulink for DSP simulations:
dspstartup
, to preconfigure all of the models that you subsequently create. Existing models are not affected.
dspstartup
within the startup
.m
file. This is an efficient way to use dspstartup
if you would like these settings to be in effect every time you start Simulink.
If you do not have a startup.m
file on your path, you can create one from the startupsav.m
template in the toolbox/local
directory.
To edit startupsav.m
, simply replace the load matlab.mat
command with a call to dspstartup
, and save the file as startup.m
. The result should look like something like this:
%STARTUP Startup file
% This file is executed when MATLAB starts up,
% if it exists anywhere on the path.
dspstartup;
The default settings in dspstartup
will now be in effect every time you start Simulink.
For more information about performing automated tasks at startup, see the documentation for the startup
command in the MATLAB Function Reference.
Customizing dspstartup.m
You can edit the dspstartup
M-file to change any of the settings above or to add your own custom settings. For example, you can change the 'StopTime'
option to a value that is better suited to your particular simulations, or set the 'SaveTime'
option to 'on'
if you prefer to record the simulation sample times.
![]() | Configuring Simulink for DSP Systems | Performance-Related Settings in dspstartup.m | ![]() |