clc, close all, clear
%
% simulink2matlab.m - get responses of diff equation form simulink
%
Tmax = 0.05;                  % Sim time
vc = 0.5;                     %  Initial condition 
%
% Parmateres
%
R = 2;
C = 0.001;
%
% Sim system
%
sim('simulink2matlab_4_m',Tmax);
%
% Plot responses (1)
%
figure;
set(gcf,'DefaultLineLineWidth',4);
set(gcf,'DefaultAxesFontSize',14);
plot(ScopeData.time,ScopeData.signals.values);
grid on


