Thursday, May 2, 2013

INTRODUCTION TO MATLAB part-4

Unknown | 1:03 PM |

Help

Help for functions in Command Window
Syntax
help
help ops
help functionname
help modelname.mdl
help methodname
help classname
help packagename
help classname.name

help packagename.classname.name
help toolboxname
help syntax
t = help('topic')
Description
· help lists all primary help topics in the Command Window. Each main help topic corresponds to a folder name on the search path the MATLAB software uses.
· help ops lists all operators and special characters, along with their descriptions.
· help functionname displays a brief description and the syntax for functionname in the Command Window. The information is known as the help comments because it comes from the comments at the top of the MATLAB function file. For more information or related help, use the links in the help output.
· If functionname is overloaded, that is, appears in multiple folders on the search path, help displays the help comments for the first functionname found on the search path, and displays a hyperlinked list of the overloaded functions and their folders.
· If functionname is also the name of a toolbox, help also displays a list of subfolders and hyperlinked list of functions in the toolbox, as defined in the Contents.m file for the toolbox.
Examples
help close displays help for the close function. It lists syntaxes for close, and includes hyperlinks to overloaded methods named close and the related delete function.
help database.close
%%%% displays help for the close function in the Database Toolbox™ product.
clip_image018

Helpbrowser

Open Help browser to access online documentation and demos
Syntax
helpbrowser



Description
helpbrowser displays the Help browser, open to its default startup page, providing direct access to a comprehensive library of demos and online documentation, including reference pages and user guides.
clip_image020
clip_image022

workspace

Open Workspace browser to manage workspace
Syntax
workspace
Description
workspace displays the Workspace browser , a graphical user interface that allows you to view and manage the contents of the workspace in MATLAB. It provides a graphical representation of the whos display, and allows you to perform the equivalent of the clear, load, open, and save functions.
The Workspace browser also displays and automatically updates statistical calculations for each variable, which you can choose to show or hide.
clip_image024

Addpath

Add folders to search path
Syntax
addpath('folderName1','folderName2','folderName3' ...)
addpath('folderName1','folderName2','folderName3' ... flag)
addpath folderName1 folderName2 folderName3 ... -flag
previous_path = addpath(...)
Description
· addpath('folderName1','folderName2','folderName3' ...) adds the specified folders to the top of the search path. Use the full path name for each folder. Use genpath with addpath to add all subfolders of folderName. Use addpath statements in a startup.m file to modify the search path programmatically at startup.
· addpath('folderName1','folderName2','folderName3' ... flag) adds the specified folders to either the top or bottom of the search path, or disables folder change detection on Windows, depending on the value of position.
Examples
Add c:/matlab/myfiles to the top of the search path:
addpath('c:/matlab/myfiles')
clip_image026

pathsep

Search path separator for current platform
Syntax
c = pathsep
Description
· c = pathsep returns the search path separator character for this platform. The search path separator is the character that separates path names in the pathdef.m file, as returned by the path function.
· The character is a semicolon (;). For versions of MATLAB software earlier than version 7.7 (R2008b), the character on UNIX[1] platforms was a colon (:). Use pathsep to work programmatically with the content of the search path file.
clip_image028

userpath

View or change user portion of search path
Syntax
userpath
userpath('newpath')
userpath('reset')
userpath('clear')
Description
· userpath returns a string specifying the user portion of the search path. The user portion of the search path is the first folder on the search path, above the folders supplied by MathWorks.
· The default folder is Documents/MATLAB on all platforms except Windows platforms released before Windows Vista™—for those Windows platforms, the default is My Documents/MATLAB.
· By default, the userpath folder is the current folder when you start up MATLAB — that is, it is the default startup folder.
· On Macintosh and UNIX platforms, you can automatically add additional subfolders to the top of the search path upon startup by specifying the path for the subfolders via the MATLABPATH environment variable.
clip_image030

recycle

Set option to move deleted files to recycle folder
Syntax
recycle
stat = recycle
previousStat = recycle state
previousStat = recycle('state')


Description
· recycle displays the current state, on or off, for recycling files you remove using the delete function. When the value is on, deleted files move to a different location. When the value is off, the delete function permanently removes the files. .
· stat = recycle returns the current state for recycling files to the character array stat.
· previousStat = recycle state sets the recycle option for MATLAB to the specified state, either on or off. The previousStat value is the recycle state before running the statement.
· previousStat = recycle('state') is the function form of the syntax.
Example
Start from a state where file recycling is off. Verify the current recycle state:
recycle
ans =
off
clip_image032

what

List MATLAB files in folder
Syntax
what
what folderName
what className
what packageName
s = what('folderName')
Description
· what lists the path for the current folder, and lists all files and folders relevant to MATLAB found in the current folder. Files listed are M, MAT, MEX, MDL, and P-files. Folders listed are all class and package folders.
· what folderName lists path, file, and folder information for folderName.
· what className lists path, file, and folder information for method folder @className. For example, what cfit lists the MATLAB files and folders in toolbox/curvefit/curvefit/@cfit.
· what packageName lists path, file, and folder information for package folder +packageName. For example, what commsrc lists the MATLAB files and folders in toolbox/comm/comm/+commsrc.
Example
>> what
clip_image034
To download INTRODUCTION TO MATLAB PART-1,2,3,and 4. click below
click here to download

No comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Search

Infolinks In Text Ads

Total Pageviews

Subscribe here

Enter your email address:

Delivered by FeedBurner