Question: This should work either way. Index using a hard coded number does not work. Index using a variable set to the value does.

X := vector([seq(x, x = 1 .. 5)]);
Y := vector([seq(x, x = 6 .. 10)]);
X[1];
Y[1];
Yfactor := evalf(X[`1`])/Y[`1`];
evalf(Yfactor);
                      X := [1, 2, 3, 4, 5]

                     Y := [6, 7, 8, 9, 10]

                               1

                               6

                                         X[1]
                        Yfactor := -------
                                         Y[1]

                              X[1]
                              ----
                              Y[1]

m := 1;
X := vector([seq(x, x = 1 .. 5)]);
Y := vector([seq(x, x = 6 .. 10)]);
Yfactor := X[m]/Y[m];
evalf(Yfactor);
                             m := 1

                      X := [1, 2, 3, 4, 5]

                     Y := [6, 7, 8, 9, 10]

                                           1
                          Yfactor := ---
                                           6

                          0.1666666667

Please Wait...