Letters from Answer Key to Percentage?
    6 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Anne Nguyen
 el 27 de Oct. de 2019
  
    
    
    
    
    Respondida: David Hill
      
      
 el 27 de Oct. de 2019
            The answer key is:
  D  B  C  B  A  C  B  D  D  B  B  A  B  B  A  D  C     % this from G2:W2 in an Excel Spreadsheet
While (for example), Student 1's answers are:
  A  A  B  C  C  B  A  B  A  B  B  A  B  B  A  B  B     % this is from G3:W3 in an Excel Spreadsheet
How do I convert the student's answers to a percentage based on their answers vs the answer key? 
What I have so far is:
multAns = cell2mat(txt4);    % txt4 was the student's answer
ansKey = cell2mat(txt1);    % txt1 was the answer key
multipleChoiceScore = scoreMult./ansKey;
Any help would be appreciated. Thank you very much!
0 comentarios
Respuesta aceptada
  David Hill
      
      
 el 27 de Oct. de 2019
        percentCorrect = 100*sum((multAns-ansKey)==0)/length(ansKey);%assumes every question was answered
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Spreadsheets en Help Center y File Exchange.
			
	Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!