7 views (last 30 days)
I have a homework that I don't understand. This what it says
You need to make a function of [A,B] = mystatistic(Scores).
A = (average of Test 1 ) * (standard deviation of Test 3)
B = (median value of Test2) / (average of Test2)
(1) Use of sub-function
(2) Use of inline function for the sub function
I am not sure how to do [A,B] = mystatistic(Scores). Also I know what is a sub-function but I don't get it here.
Your help is highly appreciated.
MHN on 13 Mar 2016
Edited: MHN on 13 Mar 2016
Based on the question it seems "Scores" is a N*3 matrix (N shows number of students). You should write a function that outputs A and B. So your main function will look like
function [A,B] = mystatistic(Scores)
To test your program use the following Score as an example (N=10)
Scores = randi(100,10,3) %let assume the exam is out of 100
Now, try the code yourself and if you have question let us know. We are not going to solve your assignment! ;)