Write a script called 'prob2.m' that asks the user if they wish to clear the variables in the workspace. If the user responds with the strings 'y' or 'yes' then the workspace should be cleared. After the workspace is cleared the script should display the string 'Workspace cleared.' If the user responds with the strings 'n' or 'no' then the work space should not be cleared and the script should display the string 'Workspace not cleared.' If the user enters anything else, the script should say that the 'Input was not understood.' You should implement this using an if-else construction.
In the file 'hw4.m' first issue a command that lists all the variables currently in the workspace. Then execute execute 'prob2.m'. Finally, to see if your script did what it was supposed to, redisplay a list of all the variables in the workspace.