Question:input loop data into a matrix

Question:input loop data into a matrix

Maple 14

First of, thank you commenters, you have helped me so much in the past!

I am doing a matrix inversion with random numbers and I would like to loop the process, and have each inverstion go into a matrix, such that the matrix will be a bunch of rows ( i number of rows) and three columns (the matrix inversion yeieds three values)

`> for i to 2 do;> > a1h := Generate(float(range = 0.1316881e-2 .. 0.1359706e-2)); a1f := Generate(float(range = .317149811 .. .327463626)); a1cl := Generate(float(range = 0.8635532e-2 .. 0.8916362e-2));> > > a2h := Generate(float(range = 0.1434844e-2 .. 0.1481505e-2)); a2f := Generate(float(range = .308914696 .. .318960702)); a2cl := Generate(float(range = 0.795401e-2 .. 0.8212677e-2));> > a3h := Generate(float(range = 0.1981333e-2 .. 0.2045766e-2)); a3f := Generate(float(range = 0.14753995e-1 .. 0.15233799e-1)); a3cl := Generate(float(range = .149410896 .. .154269787));> > a4h := Generate(float(range = 0.2142625e-1 .. 0.22123038e-1)); a4f := Generate(float(range = 0.36513342e-1 .. 0.37700768e-1)); a4cl := Generate(float(range = 0.2614602e-2 .. 0.269963e-2));> > a5h := Generate(float(range = 0.25115535e-1 .. 0.259323e-1)); a5f := Generate(float(range = 0.40902362e-1 .. 0.4223252e-1)); a5cl := Generate(float(range = 0.1641733e-2 .. 0.1695123e-2));> > a6h := Generate(float(range = 0.1784883e-2 .. 0.1842928e-2)); a6f := Generate(float(range = .331864799 .. .34265715)); a6cl := Generate(float(range = 0.11386678e-1 .. 0.11756976e-1));> > a7h := Generate(float(range = 0.1967266e-2 .. 0.2031242e-2)); a7f := Generate(float(range = .288703709 .. .298092447)); a7cl := Generate(float(range = 0.10733819e-1 .. 0.11082886e-1));> > a8h := Generate(float(range = 0.25925344e-1 .. 0.26768445e-1)); a8f := Generate(float(range = 0.40849309e-1 .. 0.42177742e-1)); a8cl := Generate(float(range = 0.2453425e-2 .. 0.2533211e-2));> > > > M := array([[a1h, a1f, a1cl], [a2h, a2f, a2cl], [a3h, a3f, a3cl], [a4h, a4f, a4cl], [a5h, a5f, a5cl], [a6h, a6f, a6cl], [a7h, a7f, a7cl], [a8h, a8f, a8cl]]);> > Mtrans := transpose(M);> > > transpose(M);> MbyM := `&*`(Mtrans, M);> evalm(MbyM);> > MbyMinv := evalm(1/MbyM);> newM := `&*`(MbyMinv, Mtrans);> evalm(newM);> > y := array([[1, 1, 1, 1, 1, 1, 1, 1]]); transy := transpose(y);> m := evalm(`&*`(newM, transy));> >     end do; ;`

This yields 3 "m" values, and I would like to have each "m" value in a column and each iteration of the loop have its own row. I would appreciate any thoughts!

I have already been playing with the code below, to appy it to what I am doing and I am still having problems

f := Vector(5); for i to 5 do f[i] := 5.*i end do; f

Thank you!!

﻿