# procedural programming – How to get a loop for a differential equation system?

I would like to know how can I obtained a loop of this system

``````Clear["Global`*"]

n0 = 3;

Nmax = 5;

A[1] = {{0.5218440349603428`, 1.`, 0.`, 0.`, 0.`}, {1.`,
0.03043455783984461`, 1.`, 0.`, 0.`}, {0.`,
1.`, -0.5733456379977422`, 1.`, 0.`}, {0.`, 0.`,
1.`, -0.1691687728719371`, 1.`}, {0.`, 0.`, 0.`,
1.`, -0.6766851294154084`}};

A[2] = {{0.5920373626109177`, 1.`, 0.`, 0.`, 0.`}, {1.`,
0.060631154827360145`, 1.`, 0.`, 0.`}, {0.`,
1.`, -0.02863887747946947`, 1.`, 0.`}, {0.`, 0.`,
1.`, -0.35285446053637504`, 1.`}, {0.`, 0.`, 0.`, 1.`,
0.36012246351093635`}};

A[3] = {{0.67202601044949`, 1.`, 0.`, 0.`,
0.`}, {1.`, -0.3920737805614185`, 1.`, 0.`, 0.`}, {0.`,
1.`, -0.05678745158627674`, 1.`, 0.`}, {0.`, 0.`, 1.`,
0.5330963738805732`, 1.`}, {0.`, 0.`, 0.`, 1.`,
0.11619190701387883`}};

[Psi]ini = Table[KroneckerDelta[n0 - i], {i, 1, Nmax}];

usol[1] =
NDSolveValue[{I D[[Psi]
A[1].[Psi]

usol[2] =
NDSolveValue[{I D[[Psi]
usol[1][10]}, [Psi], {t, 10, 20}];

usol[3] =
NDSolveValue[{I D[[Psi]
usol[2][20]}, [Psi], {t, 20, 30}];
``````

In this form works but I would like to do in loop. Actually, I would like too joined all the usol[i] and plot them.