Quote (saber_x3 @ Sep 12 2014 03:28pm)
Your code seems fine
you got 1 extra end
did you define x?
Don't you need an "end" for the if statements and for the function itself?
do I define X in outside the function or inside?
Quote (saber_x3 @ Sep 12 2014 03:38pm)
since you're using a function, which you honestly shouldn't
you should change disp to M
and call M outside the function file
Code
if ( x==12 || x==1 || x==2 );
M=1
elseif ( x==3 || x==4 || x==5 );
M=2
well he said to write a function so I wrote it as function.