clc, close all, clear
f = @(t,x)[-x(1)+1];
[t1,y1] = ode45(f,[0 10],0);

t2 = t1(1):0.01:t1(end);
s = tf('s');
G = 1/(s+1);
y2 = step(G,t2);

figure;
set(gcf,'DefaultLineLineWidth',4);
set(gcf,'DefaultAxesFontSize',14);
plot(t1,y1)
hold on
plot(t2,y2,'--r')
grid on
hold off