I'm trying to find the average of each row in a matrix.
I have two matrices.
One matrix, NAMES
, holds a flat list of names (there are 3 names).
The other matrix,GRADES
, contains numbers.
Each row in GRADES
corresponds to a name in NAMES
.
I'd like to write a function that would output:
Name AverageOfNumbersInRow
Name AverageOfNumbersInRow
Name AverageOfNumbersInRow
I'd also like to write a function that would output the Name that has the highest average:
Name
For example, for:
GRADES←3 4 ⍴ 98 34.5 78.9 34.7 22.3 33.9 23.8 24.11 100 89.3 92.6 87.9
NAMES←3 4 ⍴ 'JaneBob Mark'
I'd like
Mark
I'm using NARS2000.
+⌿÷≢
– Adám