You stored the function in the file "switchletgrade1.m" . The name of the file needs to match the name of the function.
Also, you will need to define the output for the situation when the "if" does not hold true.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!