SlideShare a Scribd company logo
2
Most read
6
Most read
7
Most read
Introduction and Basics
 The MATLAB stands for Matrix Laboratory. It is a tool to
perform mathematical complex computations. In
MATLAB, simplified C is used as the programming
language. The MATLAB has various inbuilt toolboxes
and these toolboxes are mathematical toolbox, drag
and drop based GUI, Image processing, Neural
networks etc. The MATLAB is generally used to
implement algorithms, plotting graphs and design user
interfaces. MATLAB is used to simulate networks due
to availability of high graphics.
Following are the main components of default MATLAB
interface:
 Command Window - The Command Window is the first
important part of MATLAB which is used to show
output of already saved code and to execute MATLAB
codes temporarily.
 Workspace - The workspace is the second part of
MATLAB which is used to show allocation and
reallocation of MATLAB variables.
 Command History - The command history is the third
part of MATLAB in which MATLAB commands are
shown which are executed previously.
 Current Folder Path - The current Folder path shows
that path of the folder in which MATLAB codes are
saved.
 Current Folder Data - The Current Folder Data shows
that data which is in the folders whose path is given in
Current Folder Path.
There are three commonly used commands in
MATLAB:
 CLC – This command is used to clear all input and
output from display window.
 Clear All – This command is used to clear all objects
from workspace.
 Close All – This command is used to close all the
interfaces and return to the default interface.
Here are the main features of MATLAB;
o MATLAB is a high-level language used for complex
numerical based computations, visualization, and for
the development of different applications.
o For exploration and solving problems, MATLAB
provides an open-end environment.
o MATLAB provides tools for to build applications using
custom graphical interfaces.
 MATLAB provides an extensive library of certain
mathematical functions to perform operations on
Linear Algebra, Fourier series, statistics, and for
other mathematical computations.
 For improving code quality, MATLAB provides certain
development tools along with built-in graphics for
data visualization.
 MATLAB can be integrated with external applications
and programming languages like C, Java.
 For working with basics of MATLAB, firstly you have
to setup the MATLAB environment on your system.
After the MATLAB environment is set, you can
execute commands after >> operator.
 Example:
Enter an expression like 10 + 10 and then press enter.
MATLAB will execute this expression and return the
result as:
ans = 10
 Semicolon in MATLAB - Semicolon is used as a terminating
point of the statement.
Example:
x = 7;
y = x + 8
MATLAB will return the answer as:
y = 15
 Comments in MATLAB - Comments can be added in
MATLAB using symbol %
Example:
y = 5 % value 5 is assigned to y
There are some special variables and constants
used in MATLAB:
Ans – For most recent answer
Inf – To indicate infinity
Eps – To depict accuracy of floating point
precision
NaN – For undefined numerical result
I,j – Represent imaginary unit
There are various commands used in MATLAB. Following
are some of the commonly used commands in
MATLAB:
o cd – To change current directory
o dir – To list all files in a current directory
o what – To list all MATLAB files
o format – To control format of the display screen
o fsanf – To read formatted data from a file
o fprintf – To perform formatted write to a file
 lookfor – To search help for a keyword
 cat – To concatenate arrays
 prod – To find product of each column
 eye – To create an identity matrix
 num2cell – To convert numeric array to cell array
There are two types of program files in MATLAB:
 Scripts
 Functions
 Scripts - In these types of program files, series of
commands are written which are required to be
executed together.
 Functions - Unlike script files, function files accept
inputs to return output.
Following are the different types of operators used in
MATLAB:
 Arithmetic Operators
 Relational Operators
 Logical Operators
 Bitwise Operators
 Set Operators
 Arithmetic Operators - Arithmetic Operators include
the operators used in linear algebra including +, -, *, /,
^. Arithmetic Operators also include Array and Matrix
arithmetic operators.
 Relational Operators - Following are the types of
relational operators used:
Less than – <
Greater than – >
Less than or equal to – <=
Greater than or equal to – >=
Equal to – ==
Not equal to – ~=
 Logical Operators - There are two types of logical
operators used in MATLAB:
Element-wise – To perform operations on elements of
logical arrays
Short-Circuit wise – For operation on scalar and logical
expressions
 Bitwise Operators - These operators are used to
perform bitwise operations on bits and work bit-by-bit
using truth table for operations.
 Set Operators - These operators perform functions like
union, intersection, and testing.
There are three types of loops used in MATLAB along
with two loop control statements:
 While loop
 For loop
 Nested loop
Loop Control Statements:
 Break
 Continue
 MATLAB is used to evaluate a large amount of data
collected using computers and other such appliances.
 MATLAB finds its application in signal processing and
communication.
 MATLAB is used to perform complex matrix operations
which is useful in case of image and video processing.
 Matlab provides certain graphical and statistical
functions along with our such interesting features
which makes it popular for a wide range of use.
 Matlab is used in computational biology and
computational finance.
 Being an interpreted language, Matlab is easy to use.
 Matlab provides built-in integrated development
environment using which programs can be written
easily.
 Matlab is platform independent in the sense that it can
run on different platforms.
 Matlab has a vast library of predefined functions that
provide solutions to various technical problems.
 The main disadvantage of Matlab is that it is an
interpreted language which means that it takes more
time to execute than other compiled languages i.e. its
execution speed is slow.
 The second disadvantage is the cost. It is expensive
than the regular C or Fortran compiler. Therefore,
individuals find it expensive to purchase.
 Techsparks
Techsparks, 2nd floor, D-185, Phase 8B, Industrial Area,
Sahibzada Ajit Singh Nagar, Mohali, Punjab 160055
+91-9465330425
techsparks2013@gmail.com
http://www.techsparks.co.in

More Related Content

What's hot (20)

PPT
Matlab Basic Tutorial
Muhammad Rizwan
 
PPTX
Matlab ppt
Dhammpal Ramtake
 
PDF
Chebyshev High Pass Filter
Saikat Bhandari
 
PDF
Lecture 2: Artificial Neural Network
Mohamed Loey
 
PDF
Sparse matrix computations in MapReduce
David Gleich
 
PPT
Network Simulator Tutorial
cscarcas
 
PDF
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Ravikiran A
 
PDF
Matlab introduction lecture 1
Mohamed Awni
 
PDF
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
Amr E. Mohamed
 
DOC
Digital Signal Processing Lab Manual ECE students
UR11EC098
 
PDF
TensorFlow and Keras: An Overview
Poo Kuan Hoong
 
PPT
Matrices i
Solo Hermelin
 
PPTX
NumPy.pptx
EN1036VivekSingh
 
PDF
Generative Adversarial Networks
Mark Chang
 
PDF
Introduction to simulink (1)
Memo Love
 
PDF
Python decorators
Guillermo Blasco Jiménez
 
PPT
Hebbian Learning
ESCOM
 
PPTX
Introduction to numpy
Gaurav Aggarwal
 
PPTX
Introduction Of Artificial neural network
Nagarajan
 
Matlab Basic Tutorial
Muhammad Rizwan
 
Matlab ppt
Dhammpal Ramtake
 
Chebyshev High Pass Filter
Saikat Bhandari
 
Lecture 2: Artificial Neural Network
Mohamed Loey
 
Sparse matrix computations in MapReduce
David Gleich
 
Network Simulator Tutorial
cscarcas
 
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Ravikiran A
 
Matlab introduction lecture 1
Mohamed Awni
 
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
Amr E. Mohamed
 
Digital Signal Processing Lab Manual ECE students
UR11EC098
 
TensorFlow and Keras: An Overview
Poo Kuan Hoong
 
Matrices i
Solo Hermelin
 
NumPy.pptx
EN1036VivekSingh
 
Generative Adversarial Networks
Mark Chang
 
Introduction to simulink (1)
Memo Love
 
Python decorators
Guillermo Blasco Jiménez
 
Hebbian Learning
ESCOM
 
Introduction to numpy
Gaurav Aggarwal
 
Introduction Of Artificial neural network
Nagarajan
 

Similar to Matlab - Introduction and Basics (20)

PPTX
Matlab Introduction
ideas2ignite
 
PDF
Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...
Ahmed Gad
 
DOCX
communication system.docx
MuhammadUsman627082
 
PPTX
All About MATLAB
Multisoft Virtual Academy
 
PDF
++Matlab 14 sesiones
Rosemberth Rodriguez
 
PDF
MATLAB INTRODUCTION
Dr. Krishna Mohbey
 
PDF
MATLAB_intro_lect1 details about matlab(1).pdf
juhishrivastava25
 
PPSX
Summer training introduction to matlab
Arshit Rai
 
PDF
Introduction to Matlab for Engineering & Science Students.pdf
Dr Azizul Hasan
 
PPTX
Something about matlab, tool matlab, software.pptx
JahanzebSuhriani1
 
DOCX
KEVIN MERCHANT DOCUMENT
tejas1235
 
DOCX
Kevin merchantss
dharmesh69
 
PDF
MATLAB Assignment Help
Essay Corp
 
PDF
Basics of matlab i
ssusera9e62b
 
PPT
MATLAB workshop lecture 1MATLAB work.ppt
ssuserdee4d8
 
PDF
EE6711 Power System Simulation Lab manual
Velalar College of Engineering and Technology
 
PDF
An ntutorial[1]
Sudeshna Roy
 
PPTX
Basics of Matlab An Overview An Introductory Tutorial
ShaneMagnaye1
 
PPTX
MATLAB'S PRESENTS1.pptx
NikhilPadole5
 
PPTX
Introduction to scientific computing with matlab.pptx
CristianFloresMaldon
 
Matlab Introduction
ideas2ignite
 
Introduction to MATrices LABoratory (MATLAB) as Part of Digital Signal Proces...
Ahmed Gad
 
communication system.docx
MuhammadUsman627082
 
All About MATLAB
Multisoft Virtual Academy
 
++Matlab 14 sesiones
Rosemberth Rodriguez
 
MATLAB INTRODUCTION
Dr. Krishna Mohbey
 
MATLAB_intro_lect1 details about matlab(1).pdf
juhishrivastava25
 
Summer training introduction to matlab
Arshit Rai
 
Introduction to Matlab for Engineering & Science Students.pdf
Dr Azizul Hasan
 
Something about matlab, tool matlab, software.pptx
JahanzebSuhriani1
 
KEVIN MERCHANT DOCUMENT
tejas1235
 
Kevin merchantss
dharmesh69
 
MATLAB Assignment Help
Essay Corp
 
Basics of matlab i
ssusera9e62b
 
MATLAB workshop lecture 1MATLAB work.ppt
ssuserdee4d8
 
EE6711 Power System Simulation Lab manual
Velalar College of Engineering and Technology
 
An ntutorial[1]
Sudeshna Roy
 
Basics of Matlab An Overview An Introductory Tutorial
ShaneMagnaye1
 
MATLAB'S PRESENTS1.pptx
NikhilPadole5
 
Introduction to scientific computing with matlab.pptx
CristianFloresMaldon
 
Ad

More from Techsparks (20)

PDF
Available Research Topics in Machine Learning
Techsparks
 
PDF
How to Complete your thesis fast.pdf
Techsparks
 
PDF
How to Plan Thesis on Computer Science.pdf
Techsparks
 
PDF
Latest IEEE base paper for CSE.pdf
Techsparks
 
PDF
Popular Thesis Topics in Networking
Techsparks
 
PDF
Significant Research Topics in Cloud Computing
Techsparks
 
PPTX
Trending Topics in Machine Learning
Techsparks
 
PPTX
Masters thesis in assistance patna
Techsparks
 
PPTX
Software engineering - Topics and Research Areas
Techsparks
 
PPTX
Cloud computing and Cloud Security - Basics and Terminologies
Techsparks
 
PPTX
Data mining - Process, Techniques and Research Topics
Techsparks
 
PPTX
How to write a thesis - Guidelines to Thesis Writing
Techsparks
 
PPTX
Topics in digital communication
Techsparks
 
PPTX
Research paper writers in hyderabad
Techsparks
 
PPTX
Topics in wireless communication for project and thesis
Techsparks
 
PPTX
Masters thesis in assistance indore
Techsparks
 
PPTX
Big Data Hadoop
Techsparks
 
PPTX
Master's thesis assistance jalandhar
Techsparks
 
PPTX
How to get published in Scopus/ IEEE journals
Techsparks
 
PPTX
Topics in Networking for project and thesis
Techsparks
 
Available Research Topics in Machine Learning
Techsparks
 
How to Complete your thesis fast.pdf
Techsparks
 
How to Plan Thesis on Computer Science.pdf
Techsparks
 
Latest IEEE base paper for CSE.pdf
Techsparks
 
Popular Thesis Topics in Networking
Techsparks
 
Significant Research Topics in Cloud Computing
Techsparks
 
Trending Topics in Machine Learning
Techsparks
 
Masters thesis in assistance patna
Techsparks
 
Software engineering - Topics and Research Areas
Techsparks
 
Cloud computing and Cloud Security - Basics and Terminologies
Techsparks
 
Data mining - Process, Techniques and Research Topics
Techsparks
 
How to write a thesis - Guidelines to Thesis Writing
Techsparks
 
Topics in digital communication
Techsparks
 
Research paper writers in hyderabad
Techsparks
 
Topics in wireless communication for project and thesis
Techsparks
 
Masters thesis in assistance indore
Techsparks
 
Big Data Hadoop
Techsparks
 
Master's thesis assistance jalandhar
Techsparks
 
How to get published in Scopus/ IEEE journals
Techsparks
 
Topics in Networking for project and thesis
Techsparks
 
Ad

Recently uploaded (20)

PPTX
How to Manage Promotions in Odoo 18 Sales
Celine George
 
PPTX
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
PPTX
PPT on the Development of Education in the Victorian England
Beena E S
 
PPTX
How to Define Translation to Custom Module And Add a new language in Odoo 18
Celine George
 
PPTX
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
PPTX
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
How to Configure Lost Reasons in Odoo 18 CRM
Celine George
 
PPTX
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
PPT
digestive system for Pharm d I year HAP
rekhapositivity
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
LEGAL ASPECTS OF PSYCHIATRUC NURSING.pptx
PoojaSen20
 
PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
PDF
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
PPTX
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
PPTX
Latest Features in Odoo 18 - Odoo slides
Celine George
 
PPTX
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
Presentation: Climate Citizenship Digital Education
Karl Donert
 
How to Manage Promotions in Odoo 18 Sales
Celine George
 
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
PPT on the Development of Education in the Victorian England
Beena E S
 
How to Define Translation to Custom Module And Add a new language in Odoo 18
Celine George
 
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
How to Configure Lost Reasons in Odoo 18 CRM
Celine George
 
Nutri-QUIZ-Bee-Elementary.pptx...................
ferdinandsanbuenaven
 
digestive system for Pharm d I year HAP
rekhapositivity
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
LEGAL ASPECTS OF PSYCHIATRUC NURSING.pptx
PoojaSen20
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
Latest Features in Odoo 18 - Odoo slides
Celine George
 
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Presentation: Climate Citizenship Digital Education
Karl Donert
 

Matlab - Introduction and Basics

  • 2.  The MATLAB stands for Matrix Laboratory. It is a tool to perform mathematical complex computations. In MATLAB, simplified C is used as the programming language. The MATLAB has various inbuilt toolboxes and these toolboxes are mathematical toolbox, drag and drop based GUI, Image processing, Neural networks etc. The MATLAB is generally used to implement algorithms, plotting graphs and design user interfaces. MATLAB is used to simulate networks due to availability of high graphics.
  • 3. Following are the main components of default MATLAB interface:  Command Window - The Command Window is the first important part of MATLAB which is used to show output of already saved code and to execute MATLAB codes temporarily.  Workspace - The workspace is the second part of MATLAB which is used to show allocation and reallocation of MATLAB variables.
  • 4.  Command History - The command history is the third part of MATLAB in which MATLAB commands are shown which are executed previously.  Current Folder Path - The current Folder path shows that path of the folder in which MATLAB codes are saved.  Current Folder Data - The Current Folder Data shows that data which is in the folders whose path is given in Current Folder Path.
  • 5. There are three commonly used commands in MATLAB:  CLC – This command is used to clear all input and output from display window.  Clear All – This command is used to clear all objects from workspace.  Close All – This command is used to close all the interfaces and return to the default interface.
  • 6. Here are the main features of MATLAB; o MATLAB is a high-level language used for complex numerical based computations, visualization, and for the development of different applications. o For exploration and solving problems, MATLAB provides an open-end environment. o MATLAB provides tools for to build applications using custom graphical interfaces.
  • 7.  MATLAB provides an extensive library of certain mathematical functions to perform operations on Linear Algebra, Fourier series, statistics, and for other mathematical computations.  For improving code quality, MATLAB provides certain development tools along with built-in graphics for data visualization.  MATLAB can be integrated with external applications and programming languages like C, Java.
  • 8.  For working with basics of MATLAB, firstly you have to setup the MATLAB environment on your system. After the MATLAB environment is set, you can execute commands after >> operator.  Example: Enter an expression like 10 + 10 and then press enter. MATLAB will execute this expression and return the result as: ans = 10
  • 9.  Semicolon in MATLAB - Semicolon is used as a terminating point of the statement. Example: x = 7; y = x + 8 MATLAB will return the answer as: y = 15  Comments in MATLAB - Comments can be added in MATLAB using symbol % Example: y = 5 % value 5 is assigned to y
  • 10. There are some special variables and constants used in MATLAB: Ans – For most recent answer Inf – To indicate infinity Eps – To depict accuracy of floating point precision NaN – For undefined numerical result I,j – Represent imaginary unit
  • 11. There are various commands used in MATLAB. Following are some of the commonly used commands in MATLAB: o cd – To change current directory o dir – To list all files in a current directory o what – To list all MATLAB files o format – To control format of the display screen o fsanf – To read formatted data from a file o fprintf – To perform formatted write to a file
  • 12.  lookfor – To search help for a keyword  cat – To concatenate arrays  prod – To find product of each column  eye – To create an identity matrix  num2cell – To convert numeric array to cell array
  • 13. There are two types of program files in MATLAB:  Scripts  Functions  Scripts - In these types of program files, series of commands are written which are required to be executed together.  Functions - Unlike script files, function files accept inputs to return output.
  • 14. Following are the different types of operators used in MATLAB:  Arithmetic Operators  Relational Operators  Logical Operators  Bitwise Operators  Set Operators
  • 15.  Arithmetic Operators - Arithmetic Operators include the operators used in linear algebra including +, -, *, /, ^. Arithmetic Operators also include Array and Matrix arithmetic operators.  Relational Operators - Following are the types of relational operators used: Less than – < Greater than – > Less than or equal to – <= Greater than or equal to – >= Equal to – == Not equal to – ~=
  • 16.  Logical Operators - There are two types of logical operators used in MATLAB: Element-wise – To perform operations on elements of logical arrays Short-Circuit wise – For operation on scalar and logical expressions  Bitwise Operators - These operators are used to perform bitwise operations on bits and work bit-by-bit using truth table for operations.  Set Operators - These operators perform functions like union, intersection, and testing.
  • 17. There are three types of loops used in MATLAB along with two loop control statements:  While loop  For loop  Nested loop Loop Control Statements:  Break  Continue
  • 18.  MATLAB is used to evaluate a large amount of data collected using computers and other such appliances.  MATLAB finds its application in signal processing and communication.  MATLAB is used to perform complex matrix operations which is useful in case of image and video processing.  Matlab provides certain graphical and statistical functions along with our such interesting features which makes it popular for a wide range of use.  Matlab is used in computational biology and computational finance.
  • 19.  Being an interpreted language, Matlab is easy to use.  Matlab provides built-in integrated development environment using which programs can be written easily.  Matlab is platform independent in the sense that it can run on different platforms.  Matlab has a vast library of predefined functions that provide solutions to various technical problems.
  • 20.  The main disadvantage of Matlab is that it is an interpreted language which means that it takes more time to execute than other compiled languages i.e. its execution speed is slow.  The second disadvantage is the cost. It is expensive than the regular C or Fortran compiler. Therefore, individuals find it expensive to purchase.
  • 21.  Techsparks Techsparks, 2nd floor, D-185, Phase 8B, Industrial Area, Sahibzada Ajit Singh Nagar, Mohali, Punjab 160055 +91-9465330425 [email protected] http://www.techsparks.co.in