totalGrade is already the index (values from one to five) that can be used directly into letters, therefore you do not need find or the equivalence operation, and I also simplified your concatenating characters into one string:
letters = 'FDCBA';
letterGrades = letters(totalGrades)
This simply follows exactly what the instructions state: "make the final letter grades ... by using totalGrades... to index into letters". The instructions do not tell you to use find, or equivalence operators.
In fact all of your code uses unnecessary find operations, and very inefficient loops. Loops are not the point of this homework. The very first line states that the point is to think about using MATLAB "in terms of matrices and vectors because that is how MATLAB organizes data". You are still thinking in terms of loops, which are slow, ugly, and are definitely not thinking about data in terms of matrices and vectors.
For example, this slow find and ugly loop:
curvedGrades5 = find(curvedGrades > 5)
for i = curvedGrades5
curvedGrades(i) = 5;
end
should be just one line using logical indexing:
curvedGrades(curvedGrades>5) = 5;
If you want to learn how to use MATLAB efficiently then you need to revise your work, and especially learn about logical indexing.
Best Answer