MATLAB help mean and standard deviation

Write a function that computes the average and standard deviation of a set of student grade in three different class sections. Do not use MATLAB mean and standard deviation functions. You can use the sum function. Your function should use xlread and return average grade (a) and standard deviation (s)

3 Comments

What have you done so far? Please post your code and ask specific questions about it. Then we can help you.
Professors from the University of Maryland (U.S.) and the University of Tennessee (U.S.) caught out several students using MATLAB Answers for homework solutions a while back. Those are the incidents I know of.
There could be more.
I suspect it did not go well for the students.

Sign in to comment.

Answers (1)

So did you try sum, like
theSum = sum(grades);
and do you know about the length() or numel() function? Using those, getting the mean is trivial. Hint for standard deviation:
squareGrades = grades .^ 2;

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Asked:

on 17 Feb 2017

Answered:

on 17 Feb 2017

Community Treasure Hunt

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

Start Hunting!