excel and matlab problem
Afficher commentaires plus anciens
I have this set of data and i want to grade the average grades and output each students result with the grade. Currently the code still does not assign the grades with the averages. Kindly assist
T = readtable('C:\Users\RONNIE\Documents\EXCEL.xlsx');
NAMES = T.(1) ;
format short
AvgMarks = mean(table2array(T(:,2:end)),2) ;
if (70<=AvgMarks)&(AvgMarks<=100)
fprintf ('A')
elseif (60<=AvgMarks)&(AvgMarks<=69)
fprintf ('B')
elseif (50<=AvgMarks)&(AvgMarks<=59)
fprintf ('C')
elseif (40<=AvgMarks)&(AvgMarks<=49)
fprintf ('D')
else
fprintf ('E')
end
Tavg = table(NAMES,AvgMarks)
STUDENTRESULTS=T(1,1:end)
format short
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Type Identification dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!