Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function that has one input, arrayl, and two outputs output, medianValue and meanValue. These outputs are as follows: 1. median Value is the

image text in transcribed

Write a function that has one input, arrayl, and two outputs output, medianValue and meanValue. These outputs are as follows: 1. median Value is the median of the numbers in your array. The median is the number in the array that has exactly the same number of values that are greater than or equal to it as it has values that are less than or equal to it. In an array with an odd number of indices, this is a value from the array itself. In an array with an even number of indices, this is the average o:f the two middle values in the array. For example, for the array [58 9 2 3 1 91, the median is[0 11235899]3. For the array [102113124], the median is [2 3 4 10 1112] (4+10)/2 7. Note that the numbers before and after the median can be the same as the median. The median of [1 222222222 3] is [12222222223] 2. meanValue is the average of all of the numbers in the array. You should use a loop or multiple loops to find both of these, and you should NOT call either of the following built-in MATLAB functions: mean - median sum -cumsum Other functions, like mod, sort and length are allowed, and may be useful to you

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions

Question

What is the background of the situation?

Answered: 1 week ago