Wednesday, May 1, 2013

INTRODUCTION TO MATLAB part-1

Unknown | 8:26 PM |
MATLAB BASICS
What Is MATLAB?
MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation.

STARTING AND QUITTING MATLAB
STARTING MATLAB
On a Microsoft Windows platform, to start MATLAB, double-click the MATLAB shortcut icon on your Windows desktop. On Linux, to start MATLAB, type Matlab at the operating system prompt.
Note : On the Microsoft Windows platform, the documentation CD must be in your CD-ROM drive to start MATLAB. On both platforms, the documentation CD must be in your CD-ROM drive to access the online documentation.
You can change the directory in which MATLAB starts, define startup options including running a script upon startup, and reduce startup time in some situations
QUITTING MATLAB
To end your MATLAB session, select Exit MATLAB from the File menu in the desktop, or type quit in the Command Window. To execute specified functions each time MATLAB quits, such as saving the workspace, you can create and run a finish.m script.
MATLAB DESKTOP
When you start MATLAB, the MATLAB desktop appears, containing tools (graphical user interfaces) for managing files, variables, and applications associated with MATLAB. The first time MATLAB starts, the desktop appears as shown in the following illustration, although your Launch Pad may contain different entries.
clip_image002[7]
We can change the way your desktop looks by opening, closing, moving, and resizing the tools in it. You can also move tools outside of the desktop or return them back inside the desktop (docking). All the desktop tools provide common features such as context menus and keyboard shortcuts.
We can specify certain characteristics for the desktop tools by selecting Preferences from the File menu. For example, you can specify the font characteristics for Command Window text. For more information, click the Help button in the Preferences dialog box.
DESKTOP TOOLS
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 Window
  • Command History
  • Launch Pad
  • Help Browser
  • Current Directory Browser
  • Workspace Browser
  • Array Editor
  • Editor/Debugger
1.6.2COMMAND WINDOW
Use the Command Window to enter variables and run functions and M-files.
clip_image004[6]
Lines you enter in the Command Window 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.
Note: If other users share the same machine with you, using the same log in information, then they will have access to the functions you ran during a session via the Command History. If you do not want other users to have access to the Command History from your session, select Clear Command History from the Edit menu before you quit MATLAB.
1.6.3 RUNNING EXTERNAL PROGRAMS
You can run external programs from the MATLAB Command Window. 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 editor called emacs for a file named magik.m. When you quit the external program, the operating system returns control to MATLAB.
1.6.4 LAUNCH PAD
MATLAB’s Launch Pad provides easy access to tools, demos, and documentation.
clip_image006[9]
1.6.5 HELP BROWSER
Use the Help browser to search and view documentation for all Math Works products. The Help browser is a Web browser integrated into the MATLAB desktop that displays HTML documents.
To open the Help browser, click the help button ? in the toolbar, or type help browser in the Command Window. The Help browser consists of two panes, the Help Navigator, which you use to find information, and the display pane, where you view the information.
clip_image008[4]
HELP NAVIGATOR
Use to Help Navigator to find information. It includes:
• Product filter
Set the filter to show documentation only for the products you specify.
Note: In the Student Version of MATLAB & Simulink, the product filter is initially set to display a subset of the entire documentation set. You can add or delete which product documentation is displayed by using the product filter.
Contents tab
View the titles and tables of contents of documentation for your products.
• Index tab
Find specific index entries (selected keywords) in the Math Works documentation for your products.
• Search tab
Look 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 Help browser, 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 Help browser. 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.
CURRENT DIRECTORY BROWSER
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.
clip_image010[6]
To search for, view, open, and make changes to MATLAB-related directories and files, use the MATLAB Current Directory browser. Alternatively, you can use the functions dir, cd, and delete.
clip_image012[7]
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, add path to add directories to the path, and rmpath to remove directories from the path.
WORKSPACE BROWSER
The 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 workspace by using functions, running M-files, and loading saved workspaces. To view the workspace and information about each variable, use the Workspace browser, or use the functions who and whos.
To delete variables from the workspace, select the variable and select Delete from the Edit menu. Alternatively, use the clear function. The workspace is not maintained after you end the MATLAB session. To save the workspace to a file that can be read during a later MATLAB session, select Save Workspace As from the File menu, or use the save function. This saves the workspace 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.
clip_image014[6]
Array Editor
Double-click on a variable in the Workspace browser to see it in the Array Editor. Use the Array Editor to view and edit a visual representation of one- or two-dimensional numeric arrays, strings, and cell arrays of strings that are in the workspace.
clip_image016[5]
Editor/Debugger
Use the Editor/Debugger to create and debug M-files, which are programs you write to run MATLAB functions. The Editor/Debugger provides a graphical user interface for basic text editing, as well as for M-file debugging.
You can use any text editor to create M-files, such as Emacs, and can use preferences (accessible from the desktop File menu) to specify that editor as the default. If you use another editor, you can still use the MATLAB Editor/ Debugger 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 Command Window by using the type function.
clip_image018
OTHER DEVELOPMENT ENVIRONMENT FEATURES
Additional development environment features are:
Importing and Exporting Data
Techniques for bringing data created by other applications into the MATLAB workspace, including the Import Wizard, and packaging MATLAB workspace variables for use by other applications.
Improving M-File Performance
The Profiler is a tool that measures where an M-file is spending its time. Use it to help you make speed improvements.
Interfacing with Source Control Systems
Access your source control system from within MATLAB, Simulink, and State flow.
Using Notebook
Access MATLAB’s numeric computation and visualization software from within a word processing environment (Microsoft Word).
(CONT…..)

11 comments:

  1. Nice one. best of luck and wish you more success in your works
    digital marketing services in india

    ReplyDelete
  2. Health Is God aims to deliver the best possible health reviews of the supplement collections and other wellness production that range from skincare to brain, muscle, male enhancement and brain health conditions. You, the user are of utmost importance to us, and we are committed to being the portal that sustains your healthy lifestyle. Visit for more- Health is God

    ReplyDelete
  3. Supplements For Fitness absorption. However, this application does not enjoy much support, and there are side effects of gas and constipation.Chromium is said to increase muscle mass and help eliminate fat deposits. That is why
    https://www.supplementsforfitness.com/

    ReplyDelete
  4. Pilpedia is supplying 100 percent original and accurate information at each moment of time around our site and merchandise, and the intent is to improve the usage of good and pure health supplement. For More Info please visit Pilpedia online store.

    ReplyDelete
  5. Buyers Reviews defines personal characteristics of

    different health products including skincare,weightloss,muscle and male enhancement.Buyers Reviews

    is supplying 100% original and accurate information at each moment of time around our site and

    merchandise, and the intent is to improve the usage of good and pure health supplement.

    ReplyDelete

  6. More than regarding thousands of supplements are there within the market which can facilitate your lose your weight but you would like to decide on a naturally formulated and effective product. You will have to face a heap of problems thanks to your overweight body and one in every of the most important problems is obesity. If you want to know any information about health o& Wellness Product (Side Effects & Benefits) Feel Free To ask Purefit Keto.

    http://www.purefit-keto.org/

    http://buypurefitketo.over-blog.com/

    ReplyDelete



  7. Supplements Book We have best and natural Product of health & wellness supplement you can get several benefits with Us.Different health products including skincare,weightloss,muscle and male enhancement.

    http://supplementsbook.org

    http://supplementsbook.org/keto-ultra-burn/

    http://supplementsbook.org/keto-power-diet/

    https://sites.google.com/site/supplementsbookk/

    ReplyDelete
  8. Your average Weight Loss sometimes has dozens of selections. It is so awesome this I mustn't evade this ASAP. Ultra Fast Keto Boost Really, I Twittered in affiliation with Fat Loss at night. We tend to all have responsibilities that we perform seriously. I may be suggestive of being successful. I presume that clarified it with many elites. Perhaps I ought to tone it down a very little.

    https://www.nutrifitweb.com/ultra-fast-keto-boost/

    https://www.nutrifitweb.com/

    ReplyDelete
  9. Endurmax Reviews I expect I may be able to do it simultaneously. This is the time to turn over a new leaf. This is a priceless opportunity. This is my professional information. That is from several of the Testosterone Booster industry's leading experts. Let's shift gears. You can join a forum and start discussing Male Health. You might be against Testosterone Booster for some reason. I may have to win them over. I, implausibly, have to be driven to follow Male Enhancement. This will be quite a counter offensive. It was easy money. I'll be finished in no time as if literally, I did an OK job and you learned something as it touches on Testosterone. The point is plainly that when you use Testosterone Booster you will decrease your effectiveness with Total Testosterone Booster.
    https://www.bedboosters.com/endurmax/
    https://www.bedboosters.com/

    ReplyDelete


  10. I do suspect that I must want to continue talking approximately this on well-being. in any case, those of you who know me realize that i really like wellness in order that I need to get on the ball. This is basically mass produced model of well-being. well being turned into profiled by way of thousands of information businesses and positive there are a ton of well-being however few beginners appear to take the time with wellbeing. I sense you have desired this newsletter respecting well being. you'd be smart to do the equal.

    https://www.nutrahealthpro.com

    https://www.facebook.com/nutrahealthpro

    https://twitter.com/nutrahealthpro

    https://in.pinterest.com/nutrahealthpro1

    ReplyDelete

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Search

Infolinks In Text Ads

Total Pageviews

Subscribe here

Enter your email address:

Delivered by FeedBurner