Question: answer the problem on matlab write the code for the problem 2 2 2. Write a function called GradeDist, that will produce two outputs, Average


answer the problem on matlab write the code for the problem
2 2 2. Write a function called GradeDist, that will produce two outputs, Average and StdDev, and take a single vector containing numbers between 0 and 100 as an input. Your function should do the following: Verify that the input vector has more than 10 elements before proceeding to the next step. If not, stop running and return an error message. Verify that all of the elements in the vector a greater or equal to zero and less than or equal to 100 before proceeding to the next step. Stop running and return and error message if this is not the case. Calculate the first output, Average, which will be the average value of the elements in the input vector/array. You must do this without using a built-irn Matlab function (i.e. you may not use sum(), mean(), etc.). Calculate the second output, StdDev, which is the standard deviation (assuming a Gaussian distribution) of the input elements from the average value. The standard deviation, , is calculated using the formula below. You may not use a built-in MatLab function (i.e. std()) to do this. . 0 . . x ((x AverageValue)2) where N is the total number of elements in the input vector, ( ) means sum
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
