Matlab Desktop….In other words Matlab Windows…
One should have a clear knowledge about the windows of
MATLAB before starting to work on it. MATLAB includes a variety of different windows for
displaying different types of information and performing special tasks. Each
window can generally be opened/ closed, docked in the main window or popped
out, and repositioned/resized depending on current needs/preferences. The
Window menu helps you navigate between the currently open windows, while the
Desktop menu lets you open new windows (which can also be done from the command
window).
- Command Window: -The window where you type commands and non-graphic output is displayed. A `>>' prompt shows you the system is ready for input. The lower left hand corner of the main window also displays `Ready' or `Busy' when the system is waiting or calculating. Previous commands can be accessed using the up arrow to save typing and reduce errors. Typing a few characters restricts this function to commands beginning with those characters.
- Command History: - Records commands given that session and recent sessions. Can be used for reference or to copy and paste commands.
- Workspace: - Shows the all the variables that you have currently defined and some basic information about each one, including its dimensions, minimum, and maximum values. The icons at the top of the window allow you to perform various basic tasks on variables, creating, saving, deleting, plotting, etc. Double-clicking on a variable opens it in the Variable or Array Editor. All the variables that you've defined can be saved from one session to another using File>Save Workspace As (Ctrl-S). The extension for a workspace file is .mat.
- Current Directory: - The directory (folder) that MATLAB is currently working in. This is where anything you save will go by default, and it will also influence what files MATLAB can see. You won't be able to run a script that you saved that you saved in a different directory (unless you give the full directory path), but you can run one that's in a sub-directory. The Current Directory bar at the top centre of the main window lets you change directory in the usual fashion -- you can also use the UNIX commands cd and pwd to navigate through directories. The Current Directory window shows a list of all the files in the current directory.
- Editor:- The window where you edit m-files --the files that hold scripts and functions that you've defined or are editing-- and includes most standard word-processing options and keyboard shortcuts. It can be opened by typing edit in the Command Window. Typing edit myfile will open myfile.m for editing. Multiple files are generally opened as tabs in the same editor window, but they can also be tiled for side by side comparison. Orange warnings and red errors appear as underlining and as bars in the margin. Hovering over them provides more information; clicking on the bar takes you to the relevant bit of text. Also remember that MATLAB runs the last saved version of a file, so you have to save before any changes take effect.
- Variable Editor or Array Editor: - Opens variables in an Excel-like format, and is useful for checking what data is in which column/row, checking that value is where you meant it to be, etc. Data can also be edited or created in this window. Double-clicking on a variable in the Workspace will open it for editing. Multiple variables are usually opened as tabs, but can also be tiled for side by side comparison.
- Figure Editor: - MATLAB opens figures in separate windows, which includes the ability to fine-tune the appearance of the plot, zoom, etc. You can also use the Data Cursor to extract values and save them to the Workspace. See the Help documentation for further detail. The figures can also be saved in a wide variety of formats -- it's usually a good idea to save them as an m-file (File>Generate M-file) if there's any chance at all you might want to modify the figure later and you haven't already saved the generating code in a m-file.
- MATLAB Help: - MATLAB’s help documentation is very good, and can tell you pretty much any-thing you need to know. Help>Product Help opens the Help Window, which works largely like a web browser, including forward and back buttons. Use the Contents tab for help oriented around a broad topic (most of what you need will be under the MATLAB heading, and then probably Getting Starting or Graphics) --Search or Index for more specific queries (e.g. interpolating values, polynomial fit, etc.). The `see also' at the end of each file is very useful if you haven't found quite the right thing. It can also suggest better ways of doing things. Typing help commandname in the Command Window will also bring up the help file for that command.
Written By,
Student @ VIT University
Student @ VIT University