Group Abstract Group Abstract

Message Boards Message Boards

Median gave a list as output

GROUPS:
I've got an output for "Median" as a list ,although it a single number . How can I convert it to a number that Mathematica recogises it as number ?
POSTED BY: Artur Kotarski
Answer
6 months ago
Did you take the Median of a list or a matrix?
In[1]:=  mat = RandomInteger[8, {3, 3}]
Out[1]= {{1, 7, 5}, {1, 6, 6}, {5, 4, 6}}

In[2]:= Median[ mat ]
Out[2]= {1, 6, 6}

In[3]:= Median[Flatten[mat]]
Out[3]= 5
POSTED BY: Bruce Miller
Answer
6 months ago
Thank You, that is what I wanted .
POSTED BY: Artur Kotarski
Answer
6 months ago