MATLAB: Some basic MATLAB questions

basic matlabbeginnerelseelse ifif

Okay, so I'm just starting to use MATLAB for engineering assignments. The assignment from my instructor requires us to write a loop using if, else if and else commands. Thats not what I have trouble with, but I need some assistance to come up with a way to take a number and assign it a letter grade based on the number. So the grading scale is like this:
0-59 – F 60-69 – D 70-79 – C 80-89 – B 90-100 – A
So I know I will start the first condition with if, but could someone do an example to show me how it is supposed to be set up? Please DO NOT do the whole thing, as I want to learn it on my own, but sometimes we need a bit of assistance.
Thank you
EDIT: Thanks to Matt for the first Question.

Best Answer

X = round(rand*6)
if X<3
disp('Small X')
elseif X==3
disp('X is 3')
elseif X>=3 & X<5
disp('Medium X')
else
disp('X is 5 or 6')
end
Related Question