SlideShare a Scribd company logo
mat lab introduction and basics to learn
 Mat lab is very useful in design field now a days it is
widely using software
 It has so many predefined functions
 It is space sensitive and case sensitive
 It is used in rocket launching and designing of
mechanical parts
Some Mat Lab development windows
 Command Window : where you enter commands
 Command History : It shows the previously entered
commands
 Editor : Here we edit programs
COMMANDS
 CLEAR : remove items from workspace
 WHO: list variables in workspace
 QUIT: close matlab
Math Functions
 Abs(x)=mod x
 Sqrt(x)=root x
 Round(x)=rounds to nearest
integer
 Fix(x)=round to nearest integer
towards zero
 Ceil(x)=nearest to infinite
 Ceil(x)=nearest to –ve infinite
 Rem(x,y)=gives remainder
 Exp(x)=e^x
 Log(x)=log x base e
 Sin(x)
 Cos(x)
 Tan(x)
 sinh(x)
 Cosh(x)
 Tanh(x)
Matrix entering in mat
 A=[1 2 3;2 3 4]
 Output we get here is
1 2 3
2 3 4
Colon for matrix
A(:,n) = selects all row elements in nth column of A
A(n,:) = selects all column elements in nth row of A
A(:,m:n)=selects all rows b/w columns m & n
A(m:n,:) = selects all columns b/w rows m &n
A(m:n,p:q) = selects elements in rows b/w m & n and
colmns b/w p &q
Isequal(a,b) = if element in a=b returns 1 otherwise 0
Ismember(a,b) = if a element in b returns 1 otherwise 0
Some more commands
 Magic(x)
 Sum(x)
 X’
 Diag(x)
 Fliplr(x)
 Flipud(x)
 Size(x)
 X(i,j)=n
 Length(a)
 Mean(A)
 Max(a)
 [d,n]=max(a)
 Min(a)
 Sort(a)
 Median(a)
 Std(a)
 Rand
 Rand(m,n)
Some functions
1 . Syms x
f = inline (‘x^2+2x+1)
2 . Syms (u,v)
simplify((u^3-v^3)/(u-v))
3. Syms a
syms b
syms c
syms x
solve(‘a*x^2-b*x+c)
Solving polynomial
 5*s^5+7*s^4+2*s^3+6*s+1
 To enter into the mat lab software for working
 x=[5 7 0 2 6 1]
 At the value of s=2
 Enter
 X=polyval([x],2)
 X=278
Muliplying two polynomials
 Here we write
 X=[1 2 3]
 Y=[3 4 5]
 Z =conv(x,y)
 Z=2 11 29 35
Statements
 If/elseif/else
 For loop
 While loop
Reading & writing diff files
For reading text files
X = dimread(‘abc.txt’,’,’)
For writing text files
X=[1 2 3 5 7 ]
dlmwrite(‘uvw.txt’,x);
For xls files enter xls in place dlm
Reading image files
F=uigetfile(‘*.m,*.bmp,*.gif,*.jpg’,’xxxxx’)
For plotting graphs
Plot(x,y)
Ad

Recommended

Matlab ploting
Matlab ploting
Ameen San
 
Matlab practice
Matlab practice
ZunAib Ali
 
Matlab plotting
Matlab plotting
pramodkumar1804
 
Matlab cheatsheet
Matlab cheatsheet
Piyush Mittal
 
Matlab
Matlab
VISHAL THAKUR
 
Introduction to matlab lecture 4 of 4
Introduction to matlab lecture 4 of 4
Randa Elanwar
 
Matlab cheatsheet
Matlab cheatsheet
lokeshkumer
 
Intro to matlab
Intro to matlab
Norhan Mohamed
 
Matlab plotting
Matlab plotting
shahid sultan
 
Sparse Matrix and Polynomial
Sparse Matrix and Polynomial
Aroosa Rajput
 
Mbd2
Mbd2
Mahmoud Hussein
 
Edu presentation1
Edu presentation1
hook1kf
 
C++ ammar .s.q
C++ ammar .s.q
ammarsalem5
 
graphs plotting in MATLAB
graphs plotting in MATLAB
Apurva Patil
 
Abstracting over the Monad yielded by a for comprehension and its generators
Abstracting over the Monad yielded by a for comprehension and its generators
Philip Schwarz
 
Module 2 topic 2 notes
Module 2 topic 2 notes
chrystal_brinson
 
Intro to Matlab programming
Intro to Matlab programming
Ahmed Moawad
 
Matlabtut1
Matlabtut1
Vinnu Vinay
 
Output primitives in Computer Graphics
Output primitives in Computer Graphics
Kamal Acharya
 
Sas reg multi
Sas reg multi
WenSheng Chang
 
Matlab plotting
Matlab plotting
Amr Rashed
 
Applied numerical methods lec10
Applied numerical methods lec10
Yasser Ahmed
 
Numerical integration
Numerical integration
Tarun Gehlot
 
Advanced Complex Analysis
Advanced Complex Analysis
ambareen50
 
5. R basics
5. R basics
FAO
 
Ss matlab solved
Ss matlab solved
Vijendrasingh Rathor
 
Matlab 1 level_1
Matlab 1 level_1
Ahmed Farouk
 
Introduction to programming using mat lab
Introduction to programming using mat lab
MOOCS_FacebookPage
 
CIV1900 Matlab - Plotting & Coursework
CIV1900 Matlab - Plotting & Coursework
TUOS-Sam
 
R Programming: Numeric Functions In R
R Programming: Numeric Functions In R
Rsquared Academy
 

More Related Content

What's hot (18)

Matlab plotting
Matlab plotting
shahid sultan
 
Sparse Matrix and Polynomial
Sparse Matrix and Polynomial
Aroosa Rajput
 
Mbd2
Mbd2
Mahmoud Hussein
 
Edu presentation1
Edu presentation1
hook1kf
 
C++ ammar .s.q
C++ ammar .s.q
ammarsalem5
 
graphs plotting in MATLAB
graphs plotting in MATLAB
Apurva Patil
 
Abstracting over the Monad yielded by a for comprehension and its generators
Abstracting over the Monad yielded by a for comprehension and its generators
Philip Schwarz
 
Module 2 topic 2 notes
Module 2 topic 2 notes
chrystal_brinson
 
Intro to Matlab programming
Intro to Matlab programming
Ahmed Moawad
 
Matlabtut1
Matlabtut1
Vinnu Vinay
 
Output primitives in Computer Graphics
Output primitives in Computer Graphics
Kamal Acharya
 
Sas reg multi
Sas reg multi
WenSheng Chang
 
Matlab plotting
Matlab plotting
Amr Rashed
 
Applied numerical methods lec10
Applied numerical methods lec10
Yasser Ahmed
 
Numerical integration
Numerical integration
Tarun Gehlot
 
Advanced Complex Analysis
Advanced Complex Analysis
ambareen50
 
5. R basics
5. R basics
FAO
 
Ss matlab solved
Ss matlab solved
Vijendrasingh Rathor
 
Sparse Matrix and Polynomial
Sparse Matrix and Polynomial
Aroosa Rajput
 
Edu presentation1
Edu presentation1
hook1kf
 
graphs plotting in MATLAB
graphs plotting in MATLAB
Apurva Patil
 
Abstracting over the Monad yielded by a for comprehension and its generators
Abstracting over the Monad yielded by a for comprehension and its generators
Philip Schwarz
 
Intro to Matlab programming
Intro to Matlab programming
Ahmed Moawad
 
Output primitives in Computer Graphics
Output primitives in Computer Graphics
Kamal Acharya
 
Matlab plotting
Matlab plotting
Amr Rashed
 
Applied numerical methods lec10
Applied numerical methods lec10
Yasser Ahmed
 
Numerical integration
Numerical integration
Tarun Gehlot
 
Advanced Complex Analysis
Advanced Complex Analysis
ambareen50
 
5. R basics
5. R basics
FAO
 

Viewers also liked (20)

Matlab 1 level_1
Matlab 1 level_1
Ahmed Farouk
 
Introduction to programming using mat lab
Introduction to programming using mat lab
MOOCS_FacebookPage
 
CIV1900 Matlab - Plotting & Coursework
CIV1900 Matlab - Plotting & Coursework
TUOS-Sam
 
R Programming: Numeric Functions In R
R Programming: Numeric Functions In R
Rsquared Academy
 
Variables in matlab
Variables in matlab
TUOS-Sam
 
Matlab time series example
Matlab time series example
Ovie Uddin Ovie Uddin
 
metode numerik stepest descent dengan rerata aritmatika
metode numerik stepest descent dengan rerata aritmatika
Sabarinsyah Piliang
 
Introduction to Matlab Scripts
Introduction to Matlab Scripts
Shameer Ahmed Koya
 
SSS RESUME_3
SSS RESUME_3
sai Sajja
 
Loops in matlab
Loops in matlab
TUOS-Sam
 
Modul1 metode bagi dua Praktikum Metode Numerik
Modul1 metode bagi dua Praktikum Metode Numerik
James Montolalu
 
Modul2 metode regula falsi praktikum metode numerik
Modul2 metode regula falsi praktikum metode numerik
James Montolalu
 
User defined Functions in MATLAB Part 1
User defined Functions in MATLAB Part 1
Shameer Ahmed Koya
 
Fungsi grafik di matlab
Fungsi grafik di matlab
UNISKA, SMK Telkom Banjarbaru
 
User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4
Shameer Ahmed Koya
 
C programming
C programming
Envision Computer Training Institute
 
Mat Lab
Mat Lab
Nina Tvenge
 
Metode numerik-buku-ajar-unila
Metode numerik-buku-ajar-unila
Ibad Ahmad
 
Transparency & Meltability in Hot Process Soap - A Guide for Making your own ...
Transparency & Meltability in Hot Process Soap - A Guide for Making your own ...
v2zq
 
Band Combination of Landsat 8 Earth-observing Satellite Images
Band Combination of Landsat 8 Earth-observing Satellite Images
Kabir Uddin
 
Introduction to programming using mat lab
Introduction to programming using mat lab
MOOCS_FacebookPage
 
CIV1900 Matlab - Plotting & Coursework
CIV1900 Matlab - Plotting & Coursework
TUOS-Sam
 
R Programming: Numeric Functions In R
R Programming: Numeric Functions In R
Rsquared Academy
 
Variables in matlab
Variables in matlab
TUOS-Sam
 
metode numerik stepest descent dengan rerata aritmatika
metode numerik stepest descent dengan rerata aritmatika
Sabarinsyah Piliang
 
Introduction to Matlab Scripts
Introduction to Matlab Scripts
Shameer Ahmed Koya
 
SSS RESUME_3
SSS RESUME_3
sai Sajja
 
Loops in matlab
Loops in matlab
TUOS-Sam
 
Modul1 metode bagi dua Praktikum Metode Numerik
Modul1 metode bagi dua Praktikum Metode Numerik
James Montolalu
 
Modul2 metode regula falsi praktikum metode numerik
Modul2 metode regula falsi praktikum metode numerik
James Montolalu
 
User defined Functions in MATLAB Part 1
User defined Functions in MATLAB Part 1
Shameer Ahmed Koya
 
User Defined Functions in MATLAB Part-4
User Defined Functions in MATLAB Part-4
Shameer Ahmed Koya
 
Metode numerik-buku-ajar-unila
Metode numerik-buku-ajar-unila
Ibad Ahmad
 
Transparency & Meltability in Hot Process Soap - A Guide for Making your own ...
Transparency & Meltability in Hot Process Soap - A Guide for Making your own ...
v2zq
 
Band Combination of Landsat 8 Earth-observing Satellite Images
Band Combination of Landsat 8 Earth-observing Satellite Images
Kabir Uddin
 
Ad

Similar to mat lab introduction and basics to learn (20)

MATLAB-Introd.ppt
MATLAB-Introd.ppt
kebeAman
 
Learn Matlab
Learn Matlab
Abd El Kareem Ahmed
 
Introduction to MATLAB
Introduction to MATLAB
Damian T. Gordon
 
Introduction to R programming
Introduction to R programming
Alberto Labarga
 
Introduction to matlab
Introduction to matlab
BilawalBaloch1
 
ML-CheatSheet (1).pdf
ML-CheatSheet (1).pdf
KarroumAbdelmalek
 
Introduction to matlab
Introduction to matlab
Khulna University
 
Es272 ch1
Es272 ch1
Batuhan Yıldırım
 
matlab presentation fro engninering students
matlab presentation fro engninering students
SyedSadiq73
 
Programming with matlab session 1
Programming with matlab session 1
Infinity Tech Solutions
 
INTRODUCTION TO MATLAB session with notes
INTRODUCTION TO MATLAB session with notes
Infinity Tech Solutions
 
Monadologie
Monadologie
league
 
bobok
bobok
Adi Pandarangga
 
R Language Introduction
R Language Introduction
Khaled Al-Shamaa
 
Matlab1
Matlab1
guest8ba004
 
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
Central university of Haryana
 
BUilt in Functions and Simple programs in R.pdf
BUilt in Functions and Simple programs in R.pdf
karthikaparthasarath
 
Fp in scala part 2
Fp in scala part 2
Hang Zhao
 
matlab lecture 4 solving mathematical problems.ppt
matlab lecture 4 solving mathematical problems.ppt
aaaaboud1
 
matlab_tutorial.ppt
matlab_tutorial.ppt
naveen_setty
 
MATLAB-Introd.ppt
MATLAB-Introd.ppt
kebeAman
 
Introduction to R programming
Introduction to R programming
Alberto Labarga
 
Introduction to matlab
Introduction to matlab
BilawalBaloch1
 
matlab presentation fro engninering students
matlab presentation fro engninering students
SyedSadiq73
 
INTRODUCTION TO MATLAB session with notes
INTRODUCTION TO MATLAB session with notes
Infinity Tech Solutions
 
Monadologie
Monadologie
league
 
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
Central university of Haryana
 
BUilt in Functions and Simple programs in R.pdf
BUilt in Functions and Simple programs in R.pdf
karthikaparthasarath
 
Fp in scala part 2
Fp in scala part 2
Hang Zhao
 
matlab lecture 4 solving mathematical problems.ppt
matlab lecture 4 solving mathematical problems.ppt
aaaaboud1
 
matlab_tutorial.ppt
matlab_tutorial.ppt
naveen_setty
 
Ad

Recently uploaded (20)

cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
Daily Lesson Log MATATAG ICT TEchnology 8
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
10 Key Challenges for AI within the EU Data Protection Framework.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Priyanka Aash
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
Daily Lesson Log MATATAG ICT TEchnology 8
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Smarter Aviation Data Management: Lessons from Swedavia Airports and Sweco
Safe Software
 
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
WebdriverIO & JavaScript: The Perfect Duo for Web Automation
digitaljignect
 
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
ReSTIR [DI]: Spatiotemporal reservoir resampling for real-time ray tracing ...
revolcs10
 
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Priyanka Aash
 
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 

mat lab introduction and basics to learn

  • 2.  Mat lab is very useful in design field now a days it is widely using software  It has so many predefined functions  It is space sensitive and case sensitive  It is used in rocket launching and designing of mechanical parts
  • 3. Some Mat Lab development windows  Command Window : where you enter commands  Command History : It shows the previously entered commands  Editor : Here we edit programs
  • 4. COMMANDS  CLEAR : remove items from workspace  WHO: list variables in workspace  QUIT: close matlab
  • 5. Math Functions  Abs(x)=mod x  Sqrt(x)=root x  Round(x)=rounds to nearest integer  Fix(x)=round to nearest integer towards zero  Ceil(x)=nearest to infinite  Ceil(x)=nearest to –ve infinite  Rem(x,y)=gives remainder  Exp(x)=e^x  Log(x)=log x base e  Sin(x)  Cos(x)  Tan(x)  sinh(x)  Cosh(x)  Tanh(x)
  • 6. Matrix entering in mat  A=[1 2 3;2 3 4]  Output we get here is 1 2 3 2 3 4
  • 7. Colon for matrix A(:,n) = selects all row elements in nth column of A A(n,:) = selects all column elements in nth row of A A(:,m:n)=selects all rows b/w columns m & n A(m:n,:) = selects all columns b/w rows m &n A(m:n,p:q) = selects elements in rows b/w m & n and colmns b/w p &q Isequal(a,b) = if element in a=b returns 1 otherwise 0 Ismember(a,b) = if a element in b returns 1 otherwise 0
  • 8. Some more commands  Magic(x)  Sum(x)  X’  Diag(x)  Fliplr(x)  Flipud(x)  Size(x)  X(i,j)=n  Length(a)  Mean(A)  Max(a)  [d,n]=max(a)  Min(a)  Sort(a)  Median(a)  Std(a)  Rand  Rand(m,n)
  • 9. Some functions 1 . Syms x f = inline (‘x^2+2x+1) 2 . Syms (u,v) simplify((u^3-v^3)/(u-v)) 3. Syms a syms b syms c syms x solve(‘a*x^2-b*x+c)
  • 10. Solving polynomial  5*s^5+7*s^4+2*s^3+6*s+1  To enter into the mat lab software for working  x=[5 7 0 2 6 1]  At the value of s=2  Enter  X=polyval([x],2)  X=278
  • 11. Muliplying two polynomials  Here we write  X=[1 2 3]  Y=[3 4 5]  Z =conv(x,y)  Z=2 11 29 35
  • 13. Reading & writing diff files For reading text files X = dimread(‘abc.txt’,’,’) For writing text files X=[1 2 3 5 7 ] dlmwrite(‘uvw.txt’,x); For xls files enter xls in place dlm Reading image files F=uigetfile(‘*.m,*.bmp,*.gif,*.jpg’,’xxxxx’) For plotting graphs Plot(x,y)