Recently Posted




Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/tutorial/public_html/mathforum/SSI.php on line 155

This section provides an introduction to MATLAB’s desktop tools. You can also use MATLAB functions to perform most of the features found in the desktop tools. The tools are:

•“
•“Command History”
•“
•“
•“Current
•“ Browser”
•“Array
•“/

MATLAB Command WindowUse the to enter variables and run functions and M-files.
For more information on controlling input and output, see “Controlling Input and Output” on next articles.


Command History

Matlab Command HistoryLines you enter in the are logged in the Command History window. In the Command History, you can view previously used functions, and copy and execute selected lines.

To save the input and output from a MATLAB session to a file, use the diary function.

Running External Programs

You can run external programs from the MATLAB . The exclamation point character ! is a shell escape and indicates that the rest of the input line is a command to the operating system. This is useful for invoking utilities or running other programs without quitting MATLAB. On Linux, for example,
!emacs magik.m
invokes an called emacs for a file named magik.m. When you quit the external program, the operating system returns control to MATLAB.

Launch PadMATLAB’s provides easy access to tools, demos, and documentation.

Use the to search and view documentation for all your MathWorks products. The is a Web browser integrated into the MATLAB desktop that displays HTML documents.

Help Browser

To open the , click the help button {mosimage} in the toolbar, or type helpbrowser in the .

The consists of two panes, the Help Navigator, which you use to find information, and the display pane, where you view the information.

Help Navigator

Use to Help Navigator to find information. It includes:

•Product filterSet the filter to show documentation only for the products you specify.

•Contents tabView the titles and tables of contents of documentation for your products.

•Index tab Find specific index entries (selected keywords) in the MathWorks documentation for your products.

•Search tabLook for a specific phrase in the documentation. To get help for a specific function, set the Search type to Function Name.

•Favorites tab View a list of documents you previously designated as favorites.

Display Pane

After finding documentation using the Help Navigator, view it in the display pane. While viewing the documentation, you can:

•Browse to other pages Use the arrows at the tops and bottoms of the pages, or use the back and forward buttons in the toolbar.
•Bookmark pages – Click the Add to Favorites button in the toolbar.
•Print pages – Click the print button in the toolbar.
•Find a term in the page – Type a term in the Find in page field in the toolbar and click Go.
Other features available in the display pane are: copying information, evaluating a selection, and viewing Web pages.

For More Help

In addition to the , you can use help functions. To get help for a specific function, use doc. For example, doc format displays help for the format function in the . Other means for getting help include contacting Technical Support (http://www.mathworks.com/support) and participating in the newsgroup for MATLAB users, comp.soft-sys.matlab.{mospagebreak}

Current

MATLAB file operations use the current directory and the search path as reference points. Any file you want to run must either be in the current directory or on the search path.

A quick way to view or change the current directory is by using the Current Directory field in the desktop toolbar as shown below.

Current Directory

Matlab Current DirectoryTo search for, view, open, and make changes to MATLAB-related directories and files, use the MATLAB Current . Alternatively, you can use the functions dir, cd, and delete.

Search Path

To determine how to execute functions you call, MATLAB uses a search path to find M-files and other MATLAB-related files, which are organized in directories on your file system. Any file you want to run in MATLAB must reside in the current directory or in a directory that is on the search path. By default, the files supplied with MATLAB and MathWorks toolboxes are included in the search path.

To see which directories are on the search path or to change the search path, select Set Path from the File menu in the desktop, and use the Set Path dialog box. Alternatively, you can use the path function to view the search path, addpath to add directories to the path, and rmpath to remove directories from
the path.

Browser

Matlab WorkspaceThe MATLAB workspace consists of the set of variables (named arrays) built up during a MATLAB session and stored in memory. You add variables to the by using functions, running M-files, and loading saved workspaces.
To view the and information about each variable, use the browser, or use the functions who and whos.

To delete variables from the , select the variable and select Delete from the Edit menu. Alternatively, use the clear function.

The is not maintained after you end the MATLAB session. To save the to a file that can be read during a later MATLAB session, select Save As from the File menu, or use the save function. This saves the to a binary file called a MAT-file, which has a .mat extension.There are options for saving to different formats. To read in a MAT-file, select Import Data from the File menu, or use the load function.

Array

Matlab Array EditörDouble-click on a variable in the browser to see it in the Array . Use the Array to view and edit a visual representation of one- or two-dimensional numeric arrays, strings, and cell arrays of strings that are in the .

/

Matlab Editör and matlab debuggerUse the / to create and debug M-files, which are programs you write to run MATLAB functions. The / provides a graphical user interface for basic text editing, as well as for M-file debugging.

You can use any text to create M-files, such as Emacs, and can use references (accessible from the desktop File menu) to specify that as the default. If you use another , you can still use the MATLAB / for debugging, or you can use debugging functions, such as dbstop, which sets a breakpoint.

If you just need to view the contents of an M-file, you can display it in the by using the type function.

Tags: , , , , , , ,


Related posts

You may be the one to comment first. Please leave your message below.