earthlingben75

10 Reputation

One Badge

4 years, 155 days

MaplePrimes Activity


These are questions asked by earthlingben75

I have a simple matrix, 11 rows x 3 columns, with header row.  <<

I multiply column 1 and 2 to get <<0.,0.031,0.218,0.657,1.084,1.095,0.654,0.217>>

Now, I just want to add up these elements, but 'sum' doesn't work 'Sum' doesn't work either. Is there a simpel way to do this?
 

m1 := `<|>`(`<,>`("# girls", 0, 1, 2, 3, 4, 5, 6, 7, 8), `<,>`("P(x)", 0.4e-2, 0.31e-1, .109, .219, .271, .219, .109, 0.31e-1, 0.4e-2), `<,>`("x*P(x)", 0, 0, 0, 0, 0, 0, 0, 0, 0))

Matrix(%id = 18446745635438952446)

(1)

m1[2 .. 9, 3] := `~`[`*`](m1[2 .. 9, 1], m1[2 .. 9, 2])

Vector[column](%id = 18446745635417541318)

(2)

"Sum?"

Vector[column](%id = 18446745635493441398)

(3)

"sum?"

Error, (in LinearAlgebra:-Multiply) invalid arguments

 

``


 

Download Untitled_(3).mw

Page 1 of 1