INTRODUCTION TO INTRODUCTION TO MATLABMATLAB
WHAT IS MATLABWHAT IS MATLAB
MATLAB stands for matrix laboratory. MATLAB stands for matrix laboratory. It is a It is a
high-performance language for technical computing. high-performance language for technical computing.
It integrates computation, visualization, and It integrates computation, visualization, and
programming in an easy-to-use environment where programming in an easy-to-use environment where
problems and solutions are expressed in familiar problems and solutions are expressed in familiar
mathematical notationmathematical notation
USESUSES
Math and computationMath and computation
Algorithm development Algorithm development
Data acquisition Data acquisition
Modeling, simulation, and prototypingModeling, simulation, and prototyping
Data analysis, exploration, and visualization Data analysis, exploration, and visualization
Scientific and engineering graphics Scientific and engineering graphics
Application development, including graphical user interface buildingApplication development, including graphical user interface building
MATLAB LANGUAGEMATLAB LANGUAGE
It accepts only vectors or arrays as inputs.It accepts only vectors or arrays as inputs.
All the valid syntax of ‘c’ and ‘c++’ are valid syntax here.All the valid syntax of ‘c’ and ‘c++’ are valid syntax here.
Writing a program in MATLAB is just like writing an algorithm.Writing a program in MATLAB is just like writing an algorithm.
It is user friendly .It is user friendly .
Many default commands do those works which require big programs Many default commands do those works which require big programs
to be written in ‘c’ or ‘c++’.to be written in ‘c’ or ‘c++’.
STARTING AND QUITTING MATLABSTARTING AND QUITTING MATLAB To start MATLAB on Microsoft Windows platformTo start MATLAB on Microsoft Windows platform• select the select the Start -> Programs -> MATLAB 7.0 -> Start -> Programs -> MATLAB 7.0 ->
MATLAB 7.0MATLAB 7.0
• Double-click the MATLAB shortcut icon on your Windows Double-click the MATLAB shortcut icon on your Windows
desktop.desktop.
To quit MATLABTo quit MATLAB
• Click the close box Click the close box ×× in the MATLAB desktop. in the MATLAB desktop. • Select Exit MATLAB from the desktop File menu. Select Exit MATLAB from the desktop File menu.
• Type quit at the Command Window prompt.Type quit at the Command Window prompt.
MATLAB WINDOWMATLAB WINDOW
WRITING A PROGRAM IN MATLABWRITING A PROGRAM IN MATLABFollow the steps written and the figure shownFollow the steps written and the figure shown
Open a mat (.m) file in the MATLAB window . Open a mat (.m) file in the MATLAB window .
Click on Click on file menufile menu -> save -> your file name.m -> save -> your file name.m to save a to save a file in file in MATLABMATLAB for further use . for further use .
All the saved files can be accessed from the workspace directory All the saved files can be accessed from the workspace directory present in MATLAB folder.present in MATLAB folder.
Results of all the command written in .m editor can be seen in Results of all the command written in .m editor can be seen in command prompt if programs are written without semicolon in .m command prompt if programs are written without semicolon in .m editor.editor.
Press F5 to run the program after saving it.Press F5 to run the program after saving it.
Write clc; (to clear screen)Write clc; (to clear screen) Close all; (to clear command history)Close all; (to clear command history) Clear all; (to clear workspace history)Clear all; (to clear workspace history) Figure below shows some command in command window. Just typeFigure below shows some command in command window. Just type
x, y and x+y.x, y and x+y.
CONCLUSIONCONCLUSION
This provides the basic knowledge on MATLAB.This provides the basic knowledge on MATLAB.
In the MATLAB window by typing help all the commands can be In the MATLAB window by typing help all the commands can be found out.found out.
In the MATLAB window go to help toolbox .In the MATLAB window go to help toolbox .
In that go to bioinformatics toolbox to perform jobs likeIn that go to bioinformatics toolbox to perform jobs like
• BlastBlast• Sequence alignmentSequence alignment• Phylogenetic analysisPhylogenetic analysis• Micro array analysisMicro array analysis
Top Related