Rename year directories to allow natural ordering

This commit is contained in:
2023-12-20 03:57:27 +00:00
parent 0ab1f5ad3a
commit 1f7d812b98
1895 changed files with 0 additions and 7188 deletions

View File

@ -0,0 +1,25 @@
function [grades] = fill_estimates(grades)
for i = 1:size(grades, 2)
% making copy
copy = grades(:, i);
nonzero = 0; % count of nonzero elements to calculate avg
sum = 0; % sum of nonzero elements
% looping through copy and counting number of nonzero elements
for j = 1:size(copy,1)
if copy(j) ~= 0
nonzero = nonzero + 1;
sum = sum + copy(j);
end
end
avg = round(sum / nonzero);
% looping through original and replacing any nonzero with average
for j = 1:size(copy,1)
if grades(j,i) == 0
grades(j,i) = avg;
end
end
end
end