Simulink scope autoscale

Illustration
Raldi - 2021-09-03T12:16:28+00:00
Question: Simulink scope autoscale

Hi everyone, i was wondering if there is a way for a scope i use in a  simulink model to automaticaly autoscale. Maybe from adding a code to its startfunction???  

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

assuming the scope blocks are open, the following piece of code does the autoscaling for you:

 

% find all scope blocks as MATLAB figures:
set(0, 'showhiddenhandles', 'on')
scope = findobj(0, 'Tag', 'SIMULINK_SIMSCOPE_FIGURE');
for i=1:length(scope)
  % this is the callback of the "autoscale" button:
  simscope('ScopeBar', 'ActionIcon', 'Find', scope(i))
end
set(0, 'showhiddenhandles', 'off')


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!