I have a function to find the standard deviation of a matrix of scores, I now need to use that same standard deviation equation using the mean of said scores and get a scalar in return.

1 回表示 (過去 30 日間)
I asked a question on here a day ago pertaining to an assignment I have, on how to write a function to find the standard deviation (for each student, 25 total) and 10 assignments (randomly calculated) per student. I was able to recieve help on how to do this and was given a 25x1 array output of standard deviation's for each individual student which is correct. But when I apply the same function to the class mean and class median (seperate functions, a later part of the assignment), I also get a 25x1 array when I am looking for a scalar. Any thoughts on how to correct this? I included a picture of my script with the first standard deviation calculation being in Part D. And the need for the second and third standard deviation calculations (class mean, class median) at the end of part E. Also for some reason when i don't suppress the std function in the command window I get a repeating array being displayed, any thoughts to this? Thanks in advance, can elaborate more if need be. The part d and e below are the instructions for the assignment.
e. Each student now has a mean assignment-grade. This will be their basic
"semester grade". Calculate the mean of the semester grades of all students -
this will be the "class mean-grade". Calculate the standard deviation (using
the formula) for the class mean-grade. In the same fashion, calculate the
median of all semester grades - this would be the "class median-grade".
Calculate the standard deviation in the for the class median-grade as well.

採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2020 年 10 月 3 日
To get mean and median values of the whole class (e.g. Score of size 25-by-10) in one subject (e.g.: assignment # 1) should be computed for each column with: mean(Score(:,1)); median(Score(:,1))
To get mean and median values of all assignments (e.g. Score of size 25-by-10) of one student (student 1) should be computed with: mean(Score(1,:), 2); median(Score(1,:), 2)
To get a mean and median values of all assignments (e.g. Score of size 25-by-10) of all students should be computed with:
mean(Score, 2); median(Score, 2)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWaveform Generation についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by