Question: Plotting trajectories (orbits) upon bi matrix data in evolutionary game theory

I have got the following instructions of computing the required trajectories (orbits). They have been done with Maple V3. I cannot get them going with Maple 16. I have just started with Maple and cannot see the mistake in the instruction. Can anybody help me? Thanks!


> with(LinearAlgebra);
> "A, B = Payoff matrices for players";
> A := matrix(2, 2, [4, 2, 1, 3]); B := matrix(2, 2, [1, 4, 3, 2]);
> "T defines the time interval [0,T], s is the step length";
> T := 80; s := 1/5; k := [seq(i*s, i = 1 .. T)];
> "Trajectories for different initial conditions";
> S1 := dsolve({z1(0) = .5, z2(0) = .18, diff(z1(t), t) = z1(t)*(1-z1(t))*(A[1, 2]-A[2, 2]-(A[1, 2]+A[2, 1]-A[1, 1]-A[2, 2])*z2(t)), diff(z2(t), t) = z2(t)*(1-z2(t))*(B[1, 2]-B[2, 2]-(B[1, 2]+B[2, 1]-B[1, 1]-B[2, 2])*z1(t))}, {z1(t), z2(t)});
> S2 := dsolve({z1(0) = .5, z2(0) = .1, diff(z1(t), t) = z1(t)*(1-z1(t))*(A[1, 2]-A[2, 2]-(A[1, 2]+A[2, 1]-A[1, 1]-A[2, 2])*z2(t)), diff(z2(t), t) = z2(t)*(1-z2(t))*(B[1, 2]-B[2, 2]-(B[1, 2]+B[2, 1]-B[1, 1]-B[2, 2])*z1(t))}, {z1(t), z2(t)});
> type = numeric, method = rkf45, value = array(k);
> "Trajectories";
> g1 := [seq([S1[2, 1][i, 3], S1[2, 1], [i, 2]], i = 1 .. T)];
Error, invalid subscript selector

> g2 := [seq([S2[2, 1][i, 3], S2[2, 1], [i, 2]], i = 1 .. T)];
Error, invalid subscript selector

> plot({g1, g2}, axes = boxed, color = black);
Error, (in plot) cannot determine plotting variable


Please Wait...