SlideShare a Scribd company logo
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Fundamentals of MATLABFundamentals of MATLAB
Delivered byDelivered by
Dr. Suman ChakrabortyDr. Suman Chakraborty
ProfessorProfessor
Department of Mechanical EngineeringDepartment of Mechanical Engineering
IIT KharagpurIIT Kharagpur
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
OutlineOutline
• Introduction – Using MATLAB
• Basics of Programming
• Introduction to 2D and 3D plot
• Statistical Analysis
• Numerical Analysis
• Symbolic Mathematics
• Conclusion
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
What is MATLABWhat is MATLAB
• “matrix laboratory”
• Was originally written to provide easy
access to matrix software developed by
the LINPACK and EISPACK projects that
together presented the state-of-the-art
software for matrix manipulation
• Standard instructional tool for industrial
optimization and advance computations in
mathematics, engineering, and science
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
More about MATLABMore about MATLAB
• High-performance language for technical
computing
• Integrates computation, visualization, and
programming in an easy-to-use user
environment
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Uses of MATLABUses of MATLAB
• Math and computation
• Algorithm development
• Application development, including
graphical user interface (GUI) building
• Data analysis, exploration, and
visualization
• Modeling, simulation, and prototyping
• Scientific and engineering graphics
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Components of MATLABComponents of MATLAB
• Basic Window
• Extensive Help
• GUI
• Toolboxes
• SIMULINK
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
ToolboxesToolboxes
Control System Communications
Financial Fuzzy Logic
Image Processing Neural Network
PDE Signal Processing
Statistics Symbolic Math
And Many More …
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
SimulinkSimulink
• Simulink Extensions
– Simulink Accelerator
– Real-Time Workshop
– Stateflow
• Blocksets
– DSP
– Nonlinear Control Design
– Communications
– Fixed-Point
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Documentation SetDocumentation Set
• MATLAB incorporates an exclusive set of online
help and function references containing following
divisions –
– MATLAB Installation Guide
– Getting Started with MATLAB
– Using MATLAB
– Using MATLAB Graphics
– The MATLAB Application Program Interface
Guide
– New features guide
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Basic WindowBasic Window
Command line
Result
Visualization
File
Management
Working
Variables
Command
History
Menu
Working Directory
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Help and DemoHelp and Demo
Access Matlab Help Menu
Or
Type help in Command Window
Type help subtopic
Access Matlab Demo Menu
Or
Type demo in Command Window
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Basics of ProgrammingBasics of Programming
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
File TypesFile Types
• .m files
Script (executable program)
Function (user written function)
• .fig files Plot visualization and
manipulation
• .dat or
.mat files
Working with Formatted
Data
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Script and Function FilesScript and Function Files
Script Files Function Files
Parameter
Assignment
Statement
Evaluation
Function Declaration on top
Syntax: function [output parameters] = function name (input parameters)
Save the file in – function name.m
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
VariablesVariables
MATLAB variables are created when they
appear on the left of an equal sign. The
general statement
>> variable = expression
creates the “variable” and assigns to it the value
of the expression on the right hand side
||Types of variables||
Scalar Variables
Vector Variables
Matrices
Strings
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Creating and Operating withCreating and Operating with
VariablesVariables
Scalar Vector
Strings
# variable with one row
and one column
>> x = 2;
>> y = 3;
>> z = x + y;
>> w = y – x;
>> u = y*x;
# variable with many rows
and columns
>> x = zeros(4,2);
>> y = ones(6,8);
>> x(1,3) = 1729;
>> x(:,1) = [0 0 0 0]
Colon Notation
>> sFirst = ‘Hello’
>> sSecond = ‘All’
>> sTotal = [sFirst, ‘ ’, sSecond]
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Handling MatricesHandling Matrices
Initialization Transpose
Multiplication
Inverse
Determinant Eigenvalues
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
OperatorsOperators
Arithmetic operators
Plus +
Minus -
Matrix multiply *
Array multiply .*
Matrix power ^
Array power .^
Backslash or left matrix divide 
Slash or right matrix divide /
Left array divide .
Right array divide ./
Kronecker tensor product kron
Relational operators
Equal ==
Not equal ~=
Less than <
Greater than >
Less than or equal <=
Greater than or equal >=
Logical operators
Short-circuit logical AND &&
Short-circuit logical OR ||
Element-wise logical AND &
Element-wise logical OR |
Logical NOT ~
Logical EXCLUSIVE OR xor
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
CONTROL FLOW STATEMENTSCONTROL FLOW STATEMENTS
“for” Loop
for n=1:3 % Starting value=1, end=3, increment=1
for m=3:-1:1 % Starting value=3, end=3, increment= -1
a(n,m) = n.^2 + m.^2;
end % End of the “for” loop of “m”
end % End of the “for” loop of “n”
Output
2 5 10
a = 5 8 13
10 13 18
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
“while” Loop
n = 0; eps = 1;
while (1+eps) > 1
eps = eps/2;
n = n + 1; % “n” indicates how many times the loop is
executed
end
OUTPUT
n = 53
WHILE STATEMENTSWHILE STATEMENTS
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
“if-else” Statement
rt = 1:4; pp=0; qq=0;
for i=1:4
if (rt(i) < 2)
pp = pp + 1; % Indicates how many times “if” executed
else
qq = qq + 1; % Indicates how many times “else” executed
end % End of “if-else” statement
end % End of “for” Loop
OUTPUT
pp = 1
qq = 3
IF-ELSE STATEMENTSIF-ELSE STATEMENTS
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Debugging MATLABDebugging MATLAB
• Syntax Error
– e.g. a function has been misspelled or a parenthesis
has been omitted
– Display error message and line number
– “??? Error: File: D:MATLAB6p5workDNA melting langevinHeteroSeq1.m
Line: 17 Column: 16
Assignment statements do not produce results. (Use == to test for
equality.)”
• Run-time Error
– e.g. insertion of a wrong variable or a calculation has
been performed wrongly such as “divided by zero” or
“NaN”
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Introduction to 2D and 3D plotIntroduction to 2D and 3D plot
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Plots Using MATLABPlots Using MATLAB
• 2-D Graphics
• 3-D Graphics
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Example: Plot y = sin x in 0 ≤ x ≤ 2π
2-D Graphics2-D Graphics
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Command Line PlottingCommand Line Plotting
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Editing FiguresEditing Figures
Edit Button
Legend
Text
Axis Label
Line or Point Type
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Command Line EditingCommand Line Editing
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Plot in Polar Co-ordinatePlot in Polar Co-ordinate
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Fitting PolynomialsFitting Polynomials
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Data StatisticsData Statistics
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Plotting polynomialsPlotting polynomials
y = x3
+ 4x2
- 7x – 10 in 1 ≤ x ≤ 3
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Specialized Plots using MATLABSpecialized Plots using MATLAB
• Bar and Area Graphs
• Pie Charts
• Histograms
• Discrete Data Graphs
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Bar and Area PlotsBar and Area Plots
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Pie ChartsPie Charts
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
HistogramsHistograms
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Discrete Data GraphsDiscrete Data Graphs
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
3-D Graphics3-D Graphics
Use “plot3” in place of “plot” : Simple Enough !!!!
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Use of “Mesh”, “Surf”, “Contour”Use of “Mesh”, “Surf”, “Contour”
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Statistical AnalysisStatistical Analysis
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Data Import in MATLABData Import in MATLAB
• Data as explicit list of elements
– e.g. [1 3 -5 5 7 10 5]
• Create Data in M-file
– Data editor can be utilized, more effective
than the first one
• Load data from ASCII file
– e.g. g = load(‘mydata.dat’)
• Read data using fopen, fread and
MATLAB file I/O functions
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Other methods of ImportOther methods of Import
• Specialized file reader function
– dlmread Read ASCII data file
– imread Read image from graphics file
– wk1read Read spreadsheet (WK1) file
– auread Read Sun (.au) sound file
– wavread Read Microsoft WAVE (.wav) sound file
– readsnd Read SND resources and files (Macintosh)
• MEX-file to read the data
• Develop an associated Fortran or C
program
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Exporting Data from MATLABExporting Data from MATLAB
• Diary Command
– creates a diary of present MATLAB session in
a disk file (excluding graphics)
– View and edit with any word processor
– e.g. diary mysession.out
diary off
• Save data in ASCII format
• Write data in .mat file
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Specialized Write FunctionsSpecialized Write Functions
• dlmwrite Write ASCII data file
• wk1write Write spreadsheet (WK1) file
• imwrite Write image to graphics file
• auwrite Write Sun (.au) sound file
• wavwrite Write Microsoft WAVE (.wav) sound file
• writesnd Write SND resources and files (Macintosh)
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Data StatisticsData Statistics
• Basic functions for data statistics:
– max Largest component
– min Smallest component
– mean Average or mean value
– median Median value
– std Standard deviation
– sort Sort in ascending order
– sortrows Sort rows in ascending order
– sum Sum of elements
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
More Statistical FunctionsMore Statistical Functions
– prod Product of elements.
– diff Difference function and
approximate derivative
– trapz Trapezoidal numerical
integration
– cumsum Cumulative sum of elements
– cumprod Cumulative product of elements
– cumtrapz Cumulative trapezoidal numerical
integration
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Covariance and CorrelationCovariance and Correlation
• Function cov evaluates
– Variance of a vector i.e. measure of spread or
dispersion of sample variable
– Covariance of a matrix i.e. measure of
strength of linear relationships between
variables
• Function corrcoef evaluates
– correlation coefficient i.e. normalized
measure of linear relationship strength
between variables
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Minimizing FunctionsMinimizing Functions
• Minimizing Functions with one variable
– fmin (function name, range)
• Minimizing Functions with several
variables
– fmins (function name, starting vector)
Example:
>> a = fmin (‘humps’,0.4,0.9)
>> a = 0.6370
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Plotting Mathematical FunctionsPlotting Mathematical Functions
fplot('humps',[-3,3])
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Numerical AnalysisNumerical Analysis
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Functions for Finite DifferencesFunctions for Finite Differences
• diff Difference between
successive elements of a
vector
Numerical partial derivatives
of a vector
• gradient Numerical partial derivatives
a matrix
• del2 Discrete Laplacian of a
matrix
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Functions for Fourier AnalysisFunctions for Fourier Analysis
• fft Discrete Fourier transform
• fft2 Two-dimensional discrete Fourier
transform
• fftn N-dimensional discrete Fourier transform.
• ifft Inverse discrete Fourier transform
• ifft2 Two-dimensional inverse discrete Fourier
transform
• ifftn N-dimensional inverse discrete Fourier
transform
• abs Magnitude
• angle Phase angle
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Solving Linear EquationsSolving Linear Equations
• Solution by Square System
• Overdetermined System
• Undetermined System
General situation involves a square coefficient
matrix A and a single right-hand side column
vector b.
e.g. Ax = b then solution: x = bA
System is solved by ‘backslash’ operator
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Overdetermined EquationOverdetermined Equation
With a, b dataset fitting equation is predicted as
a
eccab −
+= 21)(
MATLAB finds C1 = 0.4763 and C2 = 0.3400
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Undetermined EquationUndetermined Equation
• More unknowns than equations
• Solution is not unique
• MATLAB finds a basic solution even it is
not unique
• Associated constraints can not be coupled
to MATLAB
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Ordinary Differential EquationsOrdinary Differential Equations
• Nonstiff solvers
– ode23: an explicit Runge-Kutta (2,3) formula i.e.
Bogacki-Shampine pair
– ode45: an explicit Runge-Kutta (4,5) formula i.e.
Dormand-Prince pair
– ode113: Adams-Bashforth-Moulton PECE solver
• Stiff solvers
– ode15s, ode23s, ode23t and ode23tb
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Generic Syntax for ODE SolverGeneric Syntax for ODE Solver
>> [T,Y] = solver (‘Func’, tspan, y0);
'Func' String containing the name of the file
that contains the system of ODEs
tspan Vector specifying the interval of integration.
For a two-element vector tspan = [t0 tfinal], the
solver integrates from t0 to tfinal.
y0 Vector of initial conditions for the problem.
Output:
T Column vector of time points
Y Solution array. Each row in Y corresponds to
the solution at a time returned in the
corresponding row of T
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Numerical IntegrationNumerical Integration
The area under a section of a function F(x)
can be evaluated by numerically
integrating F(x), a process known as
quadrature. The in-built MATLAB functions
for 1D quadrature are:
• quad - Adaptive Simpson’s Rule
• quad8 - Adaptive Newton Cotes 8
panel rule
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Numerical Integration - Example
>> Q = quad (‘sin’,0,2*pi)
>> Q = 0
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Performing Double IntegralPerforming Double Integral
% function declaration
>> function integrnd_out = integrnd (x,y)
>> integrnd_out = x*sin(x) + y*cos(y);
% Double Integral Evaluation
>> x_min = pi;
>> x_max = 2*pi;
>> y_min = 0;
>> y_max = pi;
>>
>> intg_result = dblquad (‘integrnd’, x_min, x_max, y_min, y_max)
>> intg_result = -9.8698
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Symbolic MathematicsSymbolic Mathematics
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Symbolic MathematicsSymbolic Mathematics
• The Symbolic Math Toolboxes include
symbolic computation into MATLAB’s
numeric environment
• Facilities Available with Symbolic Math
Toolboxes contain – Calculus, Linear
Algebra, Simplification, Solution of
Equations, Variable-Precision Arithmetic,
Transforms and Special Applied Functions
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
DemonstrationsDemonstrations
Command Line Demonstrations are available
with Symbolic Math Toolboxes
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Example: DifferentiationExample: Differentiation
>> syms a x
>> fx = sin (a*x)
>> dfx = diff(fx)
>> dfx = cos (a*x)*a
% with respect to a
>> dfa = diff(fx, a)
>> dfa = cos (a*x)*x
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
In Summary - Why MATLAB !In Summary - Why MATLAB !
• Interpreted language for numerical computation
• Perform numerical calculations and visualize the
results without complicated and time exhaustive
programming
• Good accuracy in numerical computing
• Specially in-built with commands and
subroutines that are commonly used by
mathematicians
• Toolboxes to make advance scientific
computations easy to implement
MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D
Thank YouThank You

More Related Content

What's hot

Brief Introduction to Matlab
Brief  Introduction to MatlabBrief  Introduction to Matlab
Brief Introduction to Matlab
Tariq kanher
 
Matlab intro
Matlab introMatlab intro
Matlab intro
Chaitanya Banoth
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
ideas2ignite
 
MATLAB INTRODUCTION
MATLAB INTRODUCTIONMATLAB INTRODUCTION
MATLAB INTRODUCTION
Dr. Krishna Mohbey
 
Matlab Basic Tutorial
Matlab Basic TutorialMatlab Basic Tutorial
Matlab Basic Tutorial
Muhammad Rizwan
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processing
Dr. Manjunatha. P
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
Damian T. Gordon
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMatlab-free course by Mohd Esa
Matlab-free course by Mohd Esa
Mohd Esa
 
MATLAB - Arrays and Matrices
MATLAB - Arrays and MatricesMATLAB - Arrays and Matrices
MATLAB - Arrays and Matrices
Shameer Ahmed Koya
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabSantosh V
 
Matrices in matlab
Matrices in matlabMatrices in matlab
Matrices in matlab
NikhilBanerjee7
 
Matlab basic and image
Matlab basic and imageMatlab basic and image
Matlab basic and image
Divyanshu Rasauria
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
Ravikiran A
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
aman gupta
 
Matlab - Introduction and Basics
Matlab - Introduction and BasicsMatlab - Introduction and Basics
Matlab - Introduction and Basics
Techsparks
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
Mohan Raj
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
Bhavesh Shah
 
Matlab practical and lab session
Matlab practical and lab sessionMatlab practical and lab session
Matlab practical and lab sessionDr. Krishna Mohbey
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
VidhyaSenthil
 

What's hot (20)

What is matlab
What is matlabWhat is matlab
What is matlab
 
Brief Introduction to Matlab
Brief  Introduction to MatlabBrief  Introduction to Matlab
Brief Introduction to Matlab
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
MATLAB INTRODUCTION
MATLAB INTRODUCTIONMATLAB INTRODUCTION
MATLAB INTRODUCTION
 
Matlab Basic Tutorial
Matlab Basic TutorialMatlab Basic Tutorial
Matlab Basic Tutorial
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processing
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMatlab-free course by Mohd Esa
Matlab-free course by Mohd Esa
 
MATLAB - Arrays and Matrices
MATLAB - Arrays and MatricesMATLAB - Arrays and Matrices
MATLAB - Arrays and Matrices
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matrices in matlab
Matrices in matlabMatrices in matlab
Matrices in matlab
 
Matlab basic and image
Matlab basic and imageMatlab basic and image
Matlab basic and image
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
Matlab - Introduction and Basics
Matlab - Introduction and BasicsMatlab - Introduction and Basics
Matlab - Introduction and Basics
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Matlab practical and lab session
Matlab practical and lab sessionMatlab practical and lab session
Matlab practical and lab session
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 

Viewers also liked

схема регистрации рекрутера на сайте Recruitnet
схема регистрации рекрутера на сайте Recruitnetсхема регистрации рекрутера на сайте Recruitnet
схема регистрации рекрутера на сайте RecruitnetAnton Koval
 
담보대출전문//BU797。СΟΜ//화재보험상담 말레이지아
담보대출전문//BU797。СΟΜ//화재보험상담 말레이지아담보대출전문//BU797。СΟΜ//화재보험상담 말레이지아
담보대출전문//BU797。СΟΜ//화재보험상담 말레이지아
giefheoie
 
State of the Game: Supercar
State of the Game: SupercarState of the Game: Supercar
State of the Game: Supercar
Starr Auto Rentals
 
Dubai Police Supercars
Dubai Police SupercarsDubai Police Supercars
Dubai Police Supercars
Starr Auto Rentals
 
Ican acoustics presentation 17th may 2013 tullamore
Ican acoustics presentation 17th may 2013 tullamoreIcan acoustics presentation 17th may 2013 tullamore
Ican acoustics presentation 17th may 2013 tullamoreICANAcoustics
 
Nutan microteaching ppt on contact Dermatitis
Nutan microteaching ppt on contact DermatitisNutan microteaching ppt on contact Dermatitis
Nutan microteaching ppt on contact Dermatitis
pamtutor
 
Neural networks1
Neural networks1Neural networks1
Neural networks1
Mohan Raj
 
Matlab robotics toolbox
Matlab robotics toolboxMatlab robotics toolbox
Matlab robotics toolbox
Rajesh Raveendran
 
Neural tool box
Neural tool boxNeural tool box
Neural tool box
Mohan Raj
 
Learning analytics
Learning analyticsLearning analytics
Learning analyticsJunghyun Nam
 

Viewers also liked (12)

схема регистрации рекрутера на сайте Recruitnet
схема регистрации рекрутера на сайте Recruitnetсхема регистрации рекрутера на сайте Recruitnet
схема регистрации рекрутера на сайте Recruitnet
 
담보대출전문//BU797。СΟΜ//화재보험상담 말레이지아
담보대출전문//BU797。СΟΜ//화재보험상담 말레이지아담보대출전문//BU797。СΟΜ//화재보험상담 말레이지아
담보대출전문//BU797。СΟΜ//화재보험상담 말레이지아
 
Gangi_CV
Gangi_CVGangi_CV
Gangi_CV
 
State of the Game: Supercar
State of the Game: SupercarState of the Game: Supercar
State of the Game: Supercar
 
Dubai Police Supercars
Dubai Police SupercarsDubai Police Supercars
Dubai Police Supercars
 
Ican acoustics presentation 17th may 2013 tullamore
Ican acoustics presentation 17th may 2013 tullamoreIcan acoustics presentation 17th may 2013 tullamore
Ican acoustics presentation 17th may 2013 tullamore
 
Nutan microteaching ppt on contact Dermatitis
Nutan microteaching ppt on contact DermatitisNutan microteaching ppt on contact Dermatitis
Nutan microteaching ppt on contact Dermatitis
 
Neural networks1
Neural networks1Neural networks1
Neural networks1
 
Matlab robotics toolbox
Matlab robotics toolboxMatlab robotics toolbox
Matlab robotics toolbox
 
cv-berechet
cv-berechetcv-berechet
cv-berechet
 
Neural tool box
Neural tool boxNeural tool box
Neural tool box
 
Learning analytics
Learning analyticsLearning analytics
Learning analytics
 

Similar to Matlab-fundamentals of matlab-1

Introduction to Matlab.ppt
Introduction to Matlab.pptIntroduction to Matlab.ppt
Introduction to Matlab.ppt
Ravibabu Kancharla
 
MATLAB Thesis Projects
MATLAB Thesis ProjectsMATLAB Thesis Projects
MATLAB Thesis Projects
Phdtopiccom
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
RudraGandhi7
 
Introduction to Matlab.pdf
Introduction to Matlab.pdfIntroduction to Matlab.pdf
Introduction to Matlab.pdf
ssuser43b38e
 
Object Oriented Programming in Matlab
Object Oriented Programming in Matlab Object Oriented Programming in Matlab
Object Oriented Programming in Matlab
AlbanLevy
 
Matlab tme series benni
Matlab tme series benniMatlab tme series benni
Matlab tme series bennidvbtunisia
 
Dsp file
Dsp fileDsp file
MATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.pptMATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.ppt
ssuserdee4d8
 
Basic concept of MATLAB.ppt
Basic concept of MATLAB.pptBasic concept of MATLAB.ppt
Basic concept of MATLAB.ppt
aliraza2732
 
MATLAB/SIMULINK for engineering applications: day 3
MATLAB/SIMULINK for engineering applications: day 3MATLAB/SIMULINK for engineering applications: day 3
MATLAB/SIMULINK for engineering applications: day 3
reddyprasad reddyvari
 
Matlab
Matlab Matlab
Matlab
Hashim Khan
 
Signals and systems with matlab computing and simulink modeling
Signals and systems with matlab computing and simulink modelingSignals and systems with matlab computing and simulink modeling
Signals and systems with matlab computing and simulink modelingvotasugs567
 
Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4
Randa Elanwar
 
MATLAB Programs For Beginners. | Abhi Sharma
MATLAB Programs For Beginners. | Abhi SharmaMATLAB Programs For Beginners. | Abhi Sharma
MATLAB Programs For Beginners. | Abhi Sharma
Abee Sharma
 
Scaling Apache Spark MLlib to Billions of Parameters: Spark Summit East talk ...
Scaling Apache Spark MLlib to Billions of Parameters: Spark Summit East talk ...Scaling Apache Spark MLlib to Billions of Parameters: Spark Summit East talk ...
Scaling Apache Spark MLlib to Billions of Parameters: Spark Summit East talk ...
Spark Summit
 
Parallel and Async Programming With C#
Parallel and Async Programming With C#Parallel and Async Programming With C#
Parallel and Async Programming With C#
Rainer Stropek
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantss
dharmesh69
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENT
tejas1235
 

Similar to Matlab-fundamentals of matlab-1 (20)

Introduction to Matlab.ppt
Introduction to Matlab.pptIntroduction to Matlab.ppt
Introduction to Matlab.ppt
 
MATLAB Thesis Projects
MATLAB Thesis ProjectsMATLAB Thesis Projects
MATLAB Thesis Projects
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Introduction to Matlab.pdf
Introduction to Matlab.pdfIntroduction to Matlab.pdf
Introduction to Matlab.pdf
 
Object Oriented Programming in Matlab
Object Oriented Programming in Matlab Object Oriented Programming in Matlab
Object Oriented Programming in Matlab
 
Matlab tme series benni
Matlab tme series benniMatlab tme series benni
Matlab tme series benni
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Dsp file
Dsp fileDsp file
Dsp file
 
MATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.pptMATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.ppt
 
Basic concept of MATLAB.ppt
Basic concept of MATLAB.pptBasic concept of MATLAB.ppt
Basic concept of MATLAB.ppt
 
DSP Mat Lab
DSP Mat LabDSP Mat Lab
DSP Mat Lab
 
MATLAB/SIMULINK for engineering applications: day 3
MATLAB/SIMULINK for engineering applications: day 3MATLAB/SIMULINK for engineering applications: day 3
MATLAB/SIMULINK for engineering applications: day 3
 
Matlab
Matlab Matlab
Matlab
 
Signals and systems with matlab computing and simulink modeling
Signals and systems with matlab computing and simulink modelingSignals and systems with matlab computing and simulink modeling
Signals and systems with matlab computing and simulink modeling
 
Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4
 
MATLAB Programs For Beginners. | Abhi Sharma
MATLAB Programs For Beginners. | Abhi SharmaMATLAB Programs For Beginners. | Abhi Sharma
MATLAB Programs For Beginners. | Abhi Sharma
 
Scaling Apache Spark MLlib to Billions of Parameters: Spark Summit East talk ...
Scaling Apache Spark MLlib to Billions of Parameters: Spark Summit East talk ...Scaling Apache Spark MLlib to Billions of Parameters: Spark Summit East talk ...
Scaling Apache Spark MLlib to Billions of Parameters: Spark Summit East talk ...
 
Parallel and Async Programming With C#
Parallel and Async Programming With C#Parallel and Async Programming With C#
Parallel and Async Programming With C#
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantss
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENT
 

More from Narendra Kumar Jangid

Principles of mass transfer and separation process bkd b k dutta
Principles of mass transfer and separation process bkd  b k dutta Principles of mass transfer and separation process bkd  b k dutta
Principles of mass transfer and separation process bkd b k dutta
Narendra Kumar Jangid
 
Fundamentals of matlab programming
Fundamentals of matlab programmingFundamentals of matlab programming
Fundamentals of matlab programming
Narendra Kumar Jangid
 
Microbial Fuel Cells
Microbial Fuel CellsMicrobial Fuel Cells
Microbial Fuel Cells
Narendra Kumar Jangid
 
Marketing Management-Product Management
Marketing Management-Product ManagementMarketing Management-Product Management
Marketing Management-Product Management
Narendra Kumar Jangid
 
Product Life Cycle
Product Life CycleProduct Life Cycle
Product Life Cycle
Narendra Kumar Jangid
 
Distribution
DistributionDistribution
Distribution
Narendra Kumar Jangid
 
Pricing
PricingPricing
Promotion
PromotionPromotion
Consumer Behaviour
Consumer Behaviour Consumer Behaviour
Consumer Behaviour
Narendra Kumar Jangid
 
Introduction to Marketing Management
Introduction to Marketing ManagementIntroduction to Marketing Management
Introduction to Marketing Management
Narendra Kumar Jangid
 
strategic marketing planning
strategic marketing planningstrategic marketing planning
strategic marketing planning
Narendra Kumar Jangid
 
Segmentation targetting and positioning
Segmentation targetting and positioningSegmentation targetting and positioning
Segmentation targetting and positioning
Narendra Kumar Jangid
 
Marketing intelligence and Marketing Research
Marketing intelligence and Marketing ResearchMarketing intelligence and Marketing Research
Marketing intelligence and Marketing Research
Narendra Kumar Jangid
 
Transducer
TransducerTransducer
High vacuummeasurement
High vacuummeasurementHigh vacuummeasurement
High vacuummeasurement
Narendra Kumar Jangid
 

More from Narendra Kumar Jangid (15)

Principles of mass transfer and separation process bkd b k dutta
Principles of mass transfer and separation process bkd  b k dutta Principles of mass transfer and separation process bkd  b k dutta
Principles of mass transfer and separation process bkd b k dutta
 
Fundamentals of matlab programming
Fundamentals of matlab programmingFundamentals of matlab programming
Fundamentals of matlab programming
 
Microbial Fuel Cells
Microbial Fuel CellsMicrobial Fuel Cells
Microbial Fuel Cells
 
Marketing Management-Product Management
Marketing Management-Product ManagementMarketing Management-Product Management
Marketing Management-Product Management
 
Product Life Cycle
Product Life CycleProduct Life Cycle
Product Life Cycle
 
Distribution
DistributionDistribution
Distribution
 
Pricing
PricingPricing
Pricing
 
Promotion
PromotionPromotion
Promotion
 
Consumer Behaviour
Consumer Behaviour Consumer Behaviour
Consumer Behaviour
 
Introduction to Marketing Management
Introduction to Marketing ManagementIntroduction to Marketing Management
Introduction to Marketing Management
 
strategic marketing planning
strategic marketing planningstrategic marketing planning
strategic marketing planning
 
Segmentation targetting and positioning
Segmentation targetting and positioningSegmentation targetting and positioning
Segmentation targetting and positioning
 
Marketing intelligence and Marketing Research
Marketing intelligence and Marketing ResearchMarketing intelligence and Marketing Research
Marketing intelligence and Marketing Research
 
Transducer
TransducerTransducer
Transducer
 
High vacuummeasurement
High vacuummeasurementHigh vacuummeasurement
High vacuummeasurement
 

Recently uploaded

LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 

Recently uploaded (20)

LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 

Matlab-fundamentals of matlab-1

  • 1. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Fundamentals of MATLABFundamentals of MATLAB Delivered byDelivered by Dr. Suman ChakrabortyDr. Suman Chakraborty ProfessorProfessor Department of Mechanical EngineeringDepartment of Mechanical Engineering IIT KharagpurIIT Kharagpur
  • 2. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D OutlineOutline • Introduction – Using MATLAB • Basics of Programming • Introduction to 2D and 3D plot • Statistical Analysis • Numerical Analysis • Symbolic Mathematics • Conclusion
  • 3. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D What is MATLABWhat is MATLAB • “matrix laboratory” • Was originally written to provide easy access to matrix software developed by the LINPACK and EISPACK projects that together presented the state-of-the-art software for matrix manipulation • Standard instructional tool for industrial optimization and advance computations in mathematics, engineering, and science
  • 4. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D More about MATLABMore about MATLAB • High-performance language for technical computing • Integrates computation, visualization, and programming in an easy-to-use user environment
  • 5. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Uses of MATLABUses of MATLAB • Math and computation • Algorithm development • Application development, including graphical user interface (GUI) building • Data analysis, exploration, and visualization • Modeling, simulation, and prototyping • Scientific and engineering graphics
  • 6. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Components of MATLABComponents of MATLAB • Basic Window • Extensive Help • GUI • Toolboxes • SIMULINK
  • 7. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D ToolboxesToolboxes Control System Communications Financial Fuzzy Logic Image Processing Neural Network PDE Signal Processing Statistics Symbolic Math And Many More …
  • 8. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D SimulinkSimulink • Simulink Extensions – Simulink Accelerator – Real-Time Workshop – Stateflow • Blocksets – DSP – Nonlinear Control Design – Communications – Fixed-Point
  • 9. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Documentation SetDocumentation Set • MATLAB incorporates an exclusive set of online help and function references containing following divisions – – MATLAB Installation Guide – Getting Started with MATLAB – Using MATLAB – Using MATLAB Graphics – The MATLAB Application Program Interface Guide – New features guide
  • 10. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Basic WindowBasic Window Command line Result Visualization File Management Working Variables Command History Menu Working Directory
  • 11. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Help and DemoHelp and Demo Access Matlab Help Menu Or Type help in Command Window Type help subtopic Access Matlab Demo Menu Or Type demo in Command Window
  • 12. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Basics of ProgrammingBasics of Programming
  • 13. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D File TypesFile Types • .m files Script (executable program) Function (user written function) • .fig files Plot visualization and manipulation • .dat or .mat files Working with Formatted Data
  • 14. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Script and Function FilesScript and Function Files Script Files Function Files Parameter Assignment Statement Evaluation Function Declaration on top Syntax: function [output parameters] = function name (input parameters) Save the file in – function name.m
  • 15. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D VariablesVariables MATLAB variables are created when they appear on the left of an equal sign. The general statement >> variable = expression creates the “variable” and assigns to it the value of the expression on the right hand side ||Types of variables|| Scalar Variables Vector Variables Matrices Strings
  • 16. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Creating and Operating withCreating and Operating with VariablesVariables Scalar Vector Strings # variable with one row and one column >> x = 2; >> y = 3; >> z = x + y; >> w = y – x; >> u = y*x; # variable with many rows and columns >> x = zeros(4,2); >> y = ones(6,8); >> x(1,3) = 1729; >> x(:,1) = [0 0 0 0] Colon Notation >> sFirst = ‘Hello’ >> sSecond = ‘All’ >> sTotal = [sFirst, ‘ ’, sSecond]
  • 17. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Handling MatricesHandling Matrices Initialization Transpose Multiplication Inverse Determinant Eigenvalues
  • 18. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D OperatorsOperators Arithmetic operators Plus + Minus - Matrix multiply * Array multiply .* Matrix power ^ Array power .^ Backslash or left matrix divide Slash or right matrix divide / Left array divide . Right array divide ./ Kronecker tensor product kron Relational operators Equal == Not equal ~= Less than < Greater than > Less than or equal <= Greater than or equal >= Logical operators Short-circuit logical AND && Short-circuit logical OR || Element-wise logical AND & Element-wise logical OR | Logical NOT ~ Logical EXCLUSIVE OR xor
  • 19. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D CONTROL FLOW STATEMENTSCONTROL FLOW STATEMENTS “for” Loop for n=1:3 % Starting value=1, end=3, increment=1 for m=3:-1:1 % Starting value=3, end=3, increment= -1 a(n,m) = n.^2 + m.^2; end % End of the “for” loop of “m” end % End of the “for” loop of “n” Output 2 5 10 a = 5 8 13 10 13 18
  • 20. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D “while” Loop n = 0; eps = 1; while (1+eps) > 1 eps = eps/2; n = n + 1; % “n” indicates how many times the loop is executed end OUTPUT n = 53 WHILE STATEMENTSWHILE STATEMENTS
  • 21. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D “if-else” Statement rt = 1:4; pp=0; qq=0; for i=1:4 if (rt(i) < 2) pp = pp + 1; % Indicates how many times “if” executed else qq = qq + 1; % Indicates how many times “else” executed end % End of “if-else” statement end % End of “for” Loop OUTPUT pp = 1 qq = 3 IF-ELSE STATEMENTSIF-ELSE STATEMENTS
  • 22. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Debugging MATLABDebugging MATLAB • Syntax Error – e.g. a function has been misspelled or a parenthesis has been omitted – Display error message and line number – “??? Error: File: D:MATLAB6p5workDNA melting langevinHeteroSeq1.m Line: 17 Column: 16 Assignment statements do not produce results. (Use == to test for equality.)” • Run-time Error – e.g. insertion of a wrong variable or a calculation has been performed wrongly such as “divided by zero” or “NaN”
  • 23. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Introduction to 2D and 3D plotIntroduction to 2D and 3D plot
  • 24. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Plots Using MATLABPlots Using MATLAB • 2-D Graphics • 3-D Graphics
  • 25. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Example: Plot y = sin x in 0 ≤ x ≤ 2π 2-D Graphics2-D Graphics
  • 26. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Command Line PlottingCommand Line Plotting
  • 27. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Editing FiguresEditing Figures Edit Button Legend Text Axis Label Line or Point Type
  • 28. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Command Line EditingCommand Line Editing
  • 29. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Plot in Polar Co-ordinatePlot in Polar Co-ordinate
  • 30. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Fitting PolynomialsFitting Polynomials
  • 31. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Data StatisticsData Statistics
  • 32. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Plotting polynomialsPlotting polynomials y = x3 + 4x2 - 7x – 10 in 1 ≤ x ≤ 3
  • 33. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Specialized Plots using MATLABSpecialized Plots using MATLAB • Bar and Area Graphs • Pie Charts • Histograms • Discrete Data Graphs
  • 34. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Bar and Area PlotsBar and Area Plots
  • 35. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Pie ChartsPie Charts
  • 36. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D HistogramsHistograms
  • 37. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Discrete Data GraphsDiscrete Data Graphs
  • 38. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D 3-D Graphics3-D Graphics Use “plot3” in place of “plot” : Simple Enough !!!!
  • 39. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Use of “Mesh”, “Surf”, “Contour”Use of “Mesh”, “Surf”, “Contour”
  • 40. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Statistical AnalysisStatistical Analysis
  • 41. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Data Import in MATLABData Import in MATLAB • Data as explicit list of elements – e.g. [1 3 -5 5 7 10 5] • Create Data in M-file – Data editor can be utilized, more effective than the first one • Load data from ASCII file – e.g. g = load(‘mydata.dat’) • Read data using fopen, fread and MATLAB file I/O functions
  • 42. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Other methods of ImportOther methods of Import • Specialized file reader function – dlmread Read ASCII data file – imread Read image from graphics file – wk1read Read spreadsheet (WK1) file – auread Read Sun (.au) sound file – wavread Read Microsoft WAVE (.wav) sound file – readsnd Read SND resources and files (Macintosh) • MEX-file to read the data • Develop an associated Fortran or C program
  • 43. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Exporting Data from MATLABExporting Data from MATLAB • Diary Command – creates a diary of present MATLAB session in a disk file (excluding graphics) – View and edit with any word processor – e.g. diary mysession.out diary off • Save data in ASCII format • Write data in .mat file
  • 44. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Specialized Write FunctionsSpecialized Write Functions • dlmwrite Write ASCII data file • wk1write Write spreadsheet (WK1) file • imwrite Write image to graphics file • auwrite Write Sun (.au) sound file • wavwrite Write Microsoft WAVE (.wav) sound file • writesnd Write SND resources and files (Macintosh)
  • 45. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Data StatisticsData Statistics • Basic functions for data statistics: – max Largest component – min Smallest component – mean Average or mean value – median Median value – std Standard deviation – sort Sort in ascending order – sortrows Sort rows in ascending order – sum Sum of elements
  • 46. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D More Statistical FunctionsMore Statistical Functions – prod Product of elements. – diff Difference function and approximate derivative – trapz Trapezoidal numerical integration – cumsum Cumulative sum of elements – cumprod Cumulative product of elements – cumtrapz Cumulative trapezoidal numerical integration
  • 47. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Covariance and CorrelationCovariance and Correlation • Function cov evaluates – Variance of a vector i.e. measure of spread or dispersion of sample variable – Covariance of a matrix i.e. measure of strength of linear relationships between variables • Function corrcoef evaluates – correlation coefficient i.e. normalized measure of linear relationship strength between variables
  • 48. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Minimizing FunctionsMinimizing Functions • Minimizing Functions with one variable – fmin (function name, range) • Minimizing Functions with several variables – fmins (function name, starting vector) Example: >> a = fmin (‘humps’,0.4,0.9) >> a = 0.6370
  • 49. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Plotting Mathematical FunctionsPlotting Mathematical Functions fplot('humps',[-3,3])
  • 50. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Numerical AnalysisNumerical Analysis
  • 51. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Functions for Finite DifferencesFunctions for Finite Differences • diff Difference between successive elements of a vector Numerical partial derivatives of a vector • gradient Numerical partial derivatives a matrix • del2 Discrete Laplacian of a matrix
  • 52. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Functions for Fourier AnalysisFunctions for Fourier Analysis • fft Discrete Fourier transform • fft2 Two-dimensional discrete Fourier transform • fftn N-dimensional discrete Fourier transform. • ifft Inverse discrete Fourier transform • ifft2 Two-dimensional inverse discrete Fourier transform • ifftn N-dimensional inverse discrete Fourier transform • abs Magnitude • angle Phase angle
  • 53. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Solving Linear EquationsSolving Linear Equations • Solution by Square System • Overdetermined System • Undetermined System General situation involves a square coefficient matrix A and a single right-hand side column vector b. e.g. Ax = b then solution: x = bA System is solved by ‘backslash’ operator
  • 54. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Overdetermined EquationOverdetermined Equation With a, b dataset fitting equation is predicted as a eccab − += 21)( MATLAB finds C1 = 0.4763 and C2 = 0.3400
  • 55. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Undetermined EquationUndetermined Equation • More unknowns than equations • Solution is not unique • MATLAB finds a basic solution even it is not unique • Associated constraints can not be coupled to MATLAB
  • 56. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Ordinary Differential EquationsOrdinary Differential Equations • Nonstiff solvers – ode23: an explicit Runge-Kutta (2,3) formula i.e. Bogacki-Shampine pair – ode45: an explicit Runge-Kutta (4,5) formula i.e. Dormand-Prince pair – ode113: Adams-Bashforth-Moulton PECE solver • Stiff solvers – ode15s, ode23s, ode23t and ode23tb
  • 57. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Generic Syntax for ODE SolverGeneric Syntax for ODE Solver >> [T,Y] = solver (‘Func’, tspan, y0); 'Func' String containing the name of the file that contains the system of ODEs tspan Vector specifying the interval of integration. For a two-element vector tspan = [t0 tfinal], the solver integrates from t0 to tfinal. y0 Vector of initial conditions for the problem. Output: T Column vector of time points Y Solution array. Each row in Y corresponds to the solution at a time returned in the corresponding row of T
  • 58. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Numerical IntegrationNumerical Integration The area under a section of a function F(x) can be evaluated by numerically integrating F(x), a process known as quadrature. The in-built MATLAB functions for 1D quadrature are: • quad - Adaptive Simpson’s Rule • quad8 - Adaptive Newton Cotes 8 panel rule
  • 59. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Numerical Integration - Example >> Q = quad (‘sin’,0,2*pi) >> Q = 0
  • 60. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Performing Double IntegralPerforming Double Integral % function declaration >> function integrnd_out = integrnd (x,y) >> integrnd_out = x*sin(x) + y*cos(y); % Double Integral Evaluation >> x_min = pi; >> x_max = 2*pi; >> y_min = 0; >> y_max = pi; >> >> intg_result = dblquad (‘integrnd’, x_min, x_max, y_min, y_max) >> intg_result = -9.8698
  • 61. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Symbolic MathematicsSymbolic Mathematics
  • 62. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Symbolic MathematicsSymbolic Mathematics • The Symbolic Math Toolboxes include symbolic computation into MATLAB’s numeric environment • Facilities Available with Symbolic Math Toolboxes contain – Calculus, Linear Algebra, Simplification, Solution of Equations, Variable-Precision Arithmetic, Transforms and Special Applied Functions
  • 63. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D DemonstrationsDemonstrations Command Line Demonstrations are available with Symbolic Math Toolboxes
  • 64. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Example: DifferentiationExample: Differentiation >> syms a x >> fx = sin (a*x) >> dfx = diff(fx) >> dfx = cos (a*x)*a % with respect to a >> dfa = diff(fx, a) >> dfa = cos (a*x)*x
  • 65. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D In Summary - Why MATLAB !In Summary - Why MATLAB ! • Interpreted language for numerical computation • Perform numerical calculations and visualize the results without complicated and time exhaustive programming • Good accuracy in numerical computing • Specially in-built with commands and subroutines that are commonly used by mathematicians • Toolboxes to make advance scientific computations easy to implement
  • 66. MATLAB orientation course:MATLAB orientation course: Organized byOrganized by FOCUS – R&DFOCUS – R&D Thank YouThank You