Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB 1. [Submit on zyLabs] Write a function that has one input, array1, and two outputs output, median Value and meanValue. These outputs are as

MATLAB image text in transcribed
image text in transcribed
1. [Submit on zyLabs] Write a function that has one input, array1, and two outputs output, median Value and meanValue. These outputs are as follows: 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 of the two middle values in the array. For example, for the array [5 8 9102319], the median is[0 11235899] 3. For the array [102113124], the median is [2 3 4 101112] (4+10/2 7" Note that the numbers before and after the median can be the same as the median. The median of [1 2 2 2 2 2 2 2 2 2 3] is [12222222223] 2. - - mean Value 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: mcan - mediarn - 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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

Students also viewed these Databases questions

Question

Calculate the wavelength of a 0.21-kg ball traveling at 0.10 m/s.

Answered: 1 week ago