Message Boards Message Boards

0
|
2537 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:
GROUPS:

Median gave a list as output

Posted 11 years ago
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
2 Replies
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
Posted 11 years ago
Thank You, that is what I wanted .
POSTED BY: Artur Kotarski
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract