clc,close all,clear
%
% simulink2matlab.m - get responses of diff equation form simulink
%
Tmax = 50;          % Sim time
x0 = 10;            % Initial condition
dx = 0;             % Initial condition
%
% Sim system
%
sim('simulink2matlab_1_m.mdl',Tmax);

%
% Plot responses (1)
%
t = ScopeData.time;
y = ScopeData.signals.values;
plot(t,y,'LineWidth',2)
xlabel('Time[s]');
ylabel('Amplitude')
legend('x(t)')
grid on