Write a program ,using function to find the median for the values x ,where x=[8 1 2 9 5]. ‏

Write a program ,using function to find the median for the values x ,where x=[8 1 2 9 5]. ‏

2 Comments

x=[8 1 2 9 5]
y= median (x)
solve
x= 8 1 2 9 5
x= sort (x)
x=1 2 5 8 9
y= 5

Sign in to comment.

Answers (1)

This forums are not to solve your homeworks, are to solve problems and questions when using MATLAB
For that read the documentation about functions in MATLAB
and look for a good definition of what is a median value.
MATLAB has its own implementation for that function, but it seems your homework is to do it by yourself
Good luck

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Release

R2019a

Tags

Asked:

on 3 Sep 2020

Commented:

on 3 Sep 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!