close all
clear all
clc

n=16; s=2; 
t0=0;tf=1;

A=randn(n);
B=randn(n,s); B=B/norm(B,'fro');
Y0=randn(n,s);

disp('BDF method')
tic
[t2,Y] = BDFSDE(A,B,Y0,t0,tf);
toc

odefun = @(t,y) fonction(t,y,A,B);
disp('ode23s')
tic
[T,F] = ode23s(odefun,[t0 tf],Y0);
 toc

hold on

plot(t2,Y(1,:))
plot(T,F(:,1))
xlabel('Temps')
ylabel('The solution Y_{1,1}(t)')
title(['n=',num2str(n),', s=',num2str(s)])
legend('BDF method','ode23s')
 hold off