You may choose to comment a script file. A comment is not executable but gives information for the programmer. Do not close Matlab. This is a comment. A comment begins with a percent symbol.
All text following the percent symbol is ignored when the script file is executed.
Now you shouldn't have any variables in your workspace except r. Use the what system command to make sure that you have correctly saved your script3.m file. Run the script. Use the plot function. Type this at the Matlab prompt to find out how Matlab handles division by 0.