New to Matlab, I need your help.
Suppose my data is this:
schoolid classid classsize enrollment
1001 1 10 22
1001 2 12 22
1005 1 14 29
1005 2 15 29
1018 1 8 22
1018 2 4 22
1018 3 10 22
.
.
.
And I want to find:
a. number of schools.
I found this one by
grps = findgroups(schoolid);
n = max(grps);
b. the average number of classes in a school.
I know how to solve by hand, but you know, my data is big,,, help me with codes please.
c. Provide the histogram of enrollment, and report its mean, median, max and min.
I know codes to find histogram, mean, and so on,
but you see the enrollemnt column is a double counting, I need to figure this out frist.
Please help me… Matlab geniuses… Thank you!
Best Answer