81.1k views
6 votes
The Matlab Script should:1. Clear the command window2. Clear the workspaceQuestion 1: Why do we clear the command window and workspace at the beginning of a script

User Eicksl
by
7.1k points

1 Answer

2 votes

Answer:

This is done for the simple reason of having more space to work on

Step-by-step explanation:

This is done for the simple reason of having more space to work on. By clearing the command window and workspace you provide yourself with sufficient space to create new commands without the clutter of the previous commands. This also prevents your focus from shifting towards old commands and allows you to simply focus on the commands you are currently working on. This does not clear all variables from the script, it only clears the current screen but the previous commands can still be accessed by using the up-arrow key

User Santobedi
by
6.3k points