不知道我做错了什么。我正在尝试将函数 crazyGrade 的结果用于我的新函数 GradeDist 但我做错了什么。
function [newGrades]=GradeDist(grades)
newGrades=crazyGrade(grades)
% I want to take GradeDist(grades)
%and use the parameter grades to pass through crazyGrade
%and return it back to this function...but I cant figure that out...
end
% I want to use the output of this function in GradeDist
function newGrades=crazyGrade(grades)
newGrades=upper(grades)
newGrades(grades=='A')='F';
newGrades(grades=='B')='D';
newGrades(grades=='C')='C';
newGrades(grades=='D')='B';
newGrades(grades=='F')='A';
newGrades(grades=='Y')='W';
end
当我将 GradeDist('A') 放在命令行中时。我没有得到任何输出。