Write script to clear the variables in the workspace, Programming Languages

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.

 

 

Posted Date: 3/22/2013 6:59:28 AM | Location : United States







Related Discussions:- Write script to clear the variables in the workspace, Assignment Help, Ask Question on Write script to clear the variables in the workspace, Get Answer, Expert's Help, Write script to clear the variables in the workspace Discussions

Write discussion on Write script to clear the variables in the workspace
Your posts are moderated
Related Questions
Question 1 Explain the three traits of Object Oriented Programming Question 2 Write a note on (a) Assignment Operators                             b) Bitwise Operators.

* Comments in your code are required * Main Program Operation:  # Your program should first prompt the user for an integer to seed the random number Generator. "Enter an seed

Lazytown Constabulary are concerned that young people in the town are unaware of the sorts of crime that they might encounter in their daily lives and are concerned that they may b

need someone to write a simple cobol program for me..urgent

how to rewrite C++ program the DNAStrand class (DNA Project) to instead store the nucleotide sequence in a dynamically-allocated array?

Create a visualization (programming project) and demonstrate it in the class. The project should be related to distributed systems. (A distributed system consists of multiple auton

Determine the solution to the following differential equation. x 2 y′′ + 3xy′ + 4 y = 0   Solution Find the roots to (3) first as generally. r(r -1) + 3r + 4 = 0 r

.NET class library .NET structure comes with just one category selection. And that all developers need to learn!! Whether they create the value in C# or VB.NET or J#, it doesn't

Write a program to draw the truck following figure. The program should buttons to provide When the truck runs left wheels must rotate in the correct direction. Rotating whe

Explain the Do - While Statement - Computer Programming? A do - while loop is an exit controlled loop and the body of the loop gets executed at least once if the condition is n