0

In Matlab, it is possible to link axes of different figures using linkaxes. If you zoom in one figure, the corresponding figures will be zoomed in in the same way.

I wondered if something similar was possible with Simulink scopes. It would be handy if all scopes would rescale if you manually zoom in one scope.

(An alternative would of course be to export the data to the workspace, plot it in figures and use linkaxes.)

Edit

Extending the question: would it be possible to link axes of Matlab figures and Simulink scopes?

Community
  • 1
  • 1
Karlo
  • 1,630
  • 4
  • 33
  • 57

1 Answers1

2

Simulink Scope blocks are just (fancy) MATLAB figures, so most things you can do in MATLAB you can do to a figure window.

In this case, you want to do something like

% Ensure the scopes of interest are open, then
% find the handle to all of them
hscopes = findall(0,'Tag','SIMULINK_SIMSCOPE_FIGURE');
% find the handles to all axes on the scopes
ha = findall(hscopes,'Type','Axes');
% link them
linkaxes(ha);

Obviously you need to do a little more work if you only want to link specific axes.

The procedure to link figures and scopes is similar.

Phil Goddard
  • 10,571
  • 1
  • 16
  • 28