Friday, 6 January 2012

MAT LAB SOFTWARE


Introduction

          MATLAB is a software package for high-performance numerical computation visualization. It provides an interactive environment with hundreds of built-in functions for technical computation, graphs & animations. MATLAB is a high performance interactive software package for scientific and engineering computation. MATLAB integrates numerical analysis, matrix computation, signal processing and graphics in an easy-to-use environment where problems and solutions are expressed just as they are written mathematically. It stands for MATrix LABoratory. It is developed by The Mathworks, Inc. It is a programming language.

          MATLAB is both a powerful computational environment and programming language that easily handles matrix and complex arithmetic. It is a large software package that has many advanced features built-in, and it has become a standard tool for many working in science or engineering disciplines. Among other things, it allows easy plotting in both two and three dimensions. Matlab has two different methods for executing commands: interactive mode and batch mode. In interactive mode, commands are typed (or cut-and-pasted) into the ‘command window’. In batch mode, a series of commands are saved in a text file (either using Matlab’s built-in editor, or another text editor such as Emacs) with a ‘.m’ extension. The batch commands in a file are then executed by typing the name of the file at the Matlab command prompt. The advantage to using a ‘.m’ file is that you can make small changes to your code (even in different Matlab sessions) without having to remember and type the entire set of commands. Also, when using Matlab’s built-in editor, there are simple debugging tools that can come in handy when your programs start getting large and complicated.

MATLAB Windows

1.   Command Window:

This is the main window. It is characterized by MATLAB command prompt >>. All commands, including those for running user-written programs, are typed in this window at the MATLAB prompt. In MATLAB 6 this window is a part of a MATLAB window which contains four other window namely Launch Pad, Workspace, Command History & Current Directory.

2.   Graphics Window:

The output of all graphics commands typed is flushed in to the graphics or figure window, a separate grey window with white background color. The user can create as many figure window as the system memory may allow.

3.   Edit Window:

This is where we create, write, edit & save programs in files called M-files. Any text editor can be used to carry out these tasks. On most systems MATLAB provides its own editor.



File Types
MATLAB has three types of files for storing in formations:

          M-files are standard ASCII text files, with a .m extension to the filename. There are two types of these files: script files & function files. All built-in functions in MATLAB are M-files, most of which reside in precompiled format in computer.
An M-file, or script file, is a simple text file where you can place MATLAB commands. When the files is run Matlab reads the commands and executes them exactly as it would if you had typed each command sequentially at the Matlab prompt.
All m-file names must end with the extension ‘.m’ (Eg. Plot.m). if you create a new m-file with the same as an existing m-file, Matlab will choose the one which appears first in the path order (help path for more information).
To make life easier, choose a name for your m-file which doesn’t already exist. To see if a filename .m exists, types help filename at the Matlab prompt.

Mat-files are binary data-files, with a .mat extension to the filename. Mat files are created by MATLAB when data is saved with save command. Mat-files can be loaded in to MATLAB with the load command.

Mex-files are MATLAB callable FORTRAN & C programs, with a .mex extension to the file name.
         
MATLAB features a family of add-on application-specific solutions called toolboxes. Very important to most users of MATLAB, toolboxes allow you to learn and apply specialized technology. Toolboxes allow you to learn and apply specialized technology. Toolboxes are comprehensive environment to solve particular classes of problems. Areas in which toolboxes are available include signal processing, control systems, neutral networks, fuzzy logic, wavelets, simulation, and many others.


The MATLAB System

The MATLAB system consists of five main parts:

i.                   Development Environment: This is the set of tools and facilities that help you use MATLAB functions and files. Many of these tools are graphical user’s interfaces. It includes the MATLAB desktop and command window, a command history, an editor and debugger, and browsers, for viewing help, the workspace, files, and the search path.

ii.                 The MATLAB Mathematical Function Library: This is a vast collection of computational algorithms ranging from elementary functions, like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix, eigen values, Bessel functions and fast Fourier transforms.


iii.              The MATLAB Languages: This is a high-level matrix/array language with control flow statement, functions, data structures, input/output, and object-oriented programming features. It allows both ”programming in the small” to rapidly create quick and dirty throw-away programs, and “programming in the large” to create large and complex application programs.

iv.              Graphics: MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs. It includes high-level functions for two-dimensional and three-dimensional data visualization, image processing, animation, and presentation graphics. It also includes low-level functions that allow you to fully customize the appearance of graphics as well as to build complete graphical user interfaces on your MATLAB applications.


v.                 The MATLAB Application Program Interface (API): This is a library that allows you to write C and FORTRAN programs that interact with MATLAB. It includes facilities for calling routines from MATLAB (dynamic linking). Calling MATLAB as a computational engine, and for reading and writing MAT-files.



General-Purpose Commands

General information.
Help browser       - Bring up the help browser.
Doc                      - Complete on-line help, displayed in the help browser.
Help                     - M-file help, displayed at the command line.
Help win              - M-file help, displayed in the help browser.

No comments:

Post a Comment