SlideShare a Scribd company logo
1 of 23
Introduction to MATLAB
18/11/2021
Mrs.G.Kalaiarasi
Associate Professor
Department of ECE
Jai Shriram Engineering College
Tirupur
INTRODUCTION
18/11/2021
 Cleve molar in 1984, Mathworks
inc
 Introduced as a simulation tool
 Supports Graphical Programming
 Can be interfaced with other High
Level languages
WHAT IS MATLAB?
MATLAB is a program for doing numerical computation. It
was originally designed for solving linear algebraic type
problems using matrices. It’s name is derived from MATrix
LABoratory
Difference between C and Matlab
Inbuilt Functions in Matlab (Application Oriented)
User friendly syntax
Fourth generation Programming Language tool
18/11/2021
FEATURES
MATLAB is a software package for high performance
numerical computation and visualization
Manipulating and plotting data
Especially large data sets
Scientific computing
Dynamic system modeling
System design
18/11/2021
FEATURES
cont..
MATLAB provides an interactive environment with
hundreds of reliable and accurate built-in mathematical
functions
Mathematical problems including matrix algebra, complex
arithmetic, linear systems, differential equations, signal
processing, optimization, nonlinear systems, etc.,
The most important feature of MATLAB is its programming
capability, which is very easy to learn and to use, and also
allows user-developed functions
18/11/2021
MEMORY ALLOCATION
No need for types. i.e.,
All variables are created with double precision unless
specified and they are matrices.
18/11/2021
int a;
double b;
float c;
Example:
>>x=5;
>>x1=2;
DEVELOPMENT TOOLS
MATLAB Editor
Code Analyzer
MATLAB Profiler
Directory Report
18/11/2021
EDITOR WINDOW
18/11/2021
Click to
create a new
M-File
 Extension “.m”
 A text file
containing script or
function or
program to run
edit<space> <function name>
• To understand the code sequence
• Editing can‘t be done for some Functions
USER DEFINED FUNCTION
18/11/2021
CODE ANALYZER
• It helps in debugging the error
• Types of errors
1. Functional error
linespace instead of linspace
18/11/2021
Error
How to
Avoid?
Functional Error
CODE ANALYZER
2. Syntax Error
imread(“___”) instead of imread(‘___’)
18/11/2021
Error
How to
Avoid?
Contd…
CODE ANALYZER
3. Logical Error
18/11/2021
Contd…
User should handle this kind of logic errors
SIMULINK
SIMULINK is a graphical mouse-driven program for
the simulation of dynamic systems.
SIMULINK enables students to simulate linear, as
well as nonlinear, systems easily and efficiently.
18/11/2021
AND OPERATION
18/11/2021
Text Based
 A=1
 B=0
 M=A&B
 R=A|B
SIMULINK
MATLAB WINDOWS
Command window
Figure window
Editor window
Help window
Workspace window
Current directory window
18/11/2021
MATLAB WINDOWS
• Command Window
– type commands
• Current Directory
– View folders and m-files
• Workspace
– View program variables
– Double click on a variable
to see it in the Array Editor
• Command History
– view past commands
– save a whole session
using diary
18/11/2021
MATLAB as a calculator
18/11/2021
BASIC MATLAB FUNCTIONS
VECTORS
a = [1 2 3 4 5 6 9 8 7] ;
t = 0:2:20
t = 0 2 4 6 8 10 12 14 16 18 20
b = a + 2
b = 3 4 5 6 7 8 11 10 9
c = a + b
c = 4 6 8 10 12 14 20 18 16
18/11/2021
MATRICES
B = [1 2 3 4;5 6 7 8;9 10 11 12] ;
B = 1 2 3 4
5 6 7 8
9 10 11 12
C = B'
C = 1 5 9
2 6 10
3 7 11
4 8 12
18/11/2021
BASIC MATRIX OPERATORS
X = inv(E) ;%INVERSE OF THE MATRIX
[A,H] = eig(E) %eigen value &vector
p = poly(E) %polynomial
c = abs(y) ;
D=min(a);
D=max(a);
Convolution
x = [1 2];
y = [1 4 8];
z = conv(x,y)
[xx, R] = deconv(z,y)
18/11/2021
PLOT
t=0:0.25:7;
y = sin(t);
plot(t,y) ;
xlabel('x axis');
ylabel('y axis');
title('Heading');
grid on;
gtext('text');
18/11/2021
AN AUDIO AND VIDEO FILE
a =wavread('test.wav');
wavplay(a,44100);
Plot(a);
a=aviread('movie.avi')
movie(a);
18/11/2021
Conserve our forests, wildlife and the water
bodies
to Save our MOTHER EARTH
18/11/2021

More Related Content

What's hot

Functional Scala
Functional ScalaFunctional Scala
Functional ScalaStan Lea
 
Dynamics and control lab
Dynamics and control labDynamics and control lab
Dynamics and control labSamraiz Hameed
 
MATLAB Online Research Assitance
MATLAB Online Research AssitanceMATLAB Online Research Assitance
MATLAB Online Research AssitanceMatlab Simulation
 
Working with Simulink
Working with SimulinkWorking with Simulink
Working with Simulinkthesisncode
 
LabVIEW Introduction
LabVIEW IntroductionLabVIEW Introduction
LabVIEW IntroductionSalim Khan
 
AUTOMATIC VOLTAGE CONTROL OF TRANSFORMER USING MICROCONTROLLER AND SCADA POWE...
AUTOMATIC VOLTAGE CONTROL OF TRANSFORMER USING MICROCONTROLLER AND SCADA POWE...AUTOMATIC VOLTAGE CONTROL OF TRANSFORMER USING MICROCONTROLLER AND SCADA POWE...
AUTOMATIC VOLTAGE CONTROL OF TRANSFORMER USING MICROCONTROLLER AND SCADA POWE...Ajesh Jacob
 
Simulink Projects Research Help
Simulink Projects Research HelpSimulink Projects Research Help
Simulink Projects Research HelpMatlab Simulation
 
MATLAB Assignment Service Research Help
MATLAB Assignment Service Research HelpMATLAB Assignment Service Research Help
MATLAB Assignment Service Research HelpMatlab Simulation
 
Simple MATLAB Projects for Students Research Assistance
Simple MATLAB Projects for Students Research AssistanceSimple MATLAB Projects for Students Research Assistance
Simple MATLAB Projects for Students Research AssistanceMatlab Simulation
 
Matlab Projects for EEE Research Ideas
Matlab Projects for EEE Research IdeasMatlab Projects for EEE Research Ideas
Matlab Projects for EEE Research IdeasMatlab Simulation
 
Introduction to Microchip-SIMULINK Blocksets and MATLAB Plug-in for MPLAB® IDE
Introduction to Microchip-SIMULINK Blocksets and MATLAB Plug-in for MPLAB® IDEIntroduction to Microchip-SIMULINK Blocksets and MATLAB Plug-in for MPLAB® IDE
Introduction to Microchip-SIMULINK Blocksets and MATLAB Plug-in for MPLAB® IDEPantech ProLabs India Pvt Ltd
 

What's hot (17)

Functional Scala
Functional ScalaFunctional Scala
Functional Scala
 
Dynamics and control lab
Dynamics and control labDynamics and control lab
Dynamics and control lab
 
MATLAB Online Research Assitance
MATLAB Online Research AssitanceMATLAB Online Research Assitance
MATLAB Online Research Assitance
 
Clementine tool
Clementine toolClementine tool
Clementine tool
 
Introduction of Matlab
Introduction of Matlab Introduction of Matlab
Introduction of Matlab
 
Working with Simulink
Working with SimulinkWorking with Simulink
Working with Simulink
 
LabVIEW Introduction
LabVIEW IntroductionLabVIEW Introduction
LabVIEW Introduction
 
Simulink
SimulinkSimulink
Simulink
 
AUTOMATIC VOLTAGE CONTROL OF TRANSFORMER USING MICROCONTROLLER AND SCADA POWE...
AUTOMATIC VOLTAGE CONTROL OF TRANSFORMER USING MICROCONTROLLER AND SCADA POWE...AUTOMATIC VOLTAGE CONTROL OF TRANSFORMER USING MICROCONTROLLER AND SCADA POWE...
AUTOMATIC VOLTAGE CONTROL OF TRANSFORMER USING MICROCONTROLLER AND SCADA POWE...
 
Simulink Projects Research Help
Simulink Projects Research HelpSimulink Projects Research Help
Simulink Projects Research Help
 
Simulink
SimulinkSimulink
Simulink
 
O Matrix Overview
O Matrix OverviewO Matrix Overview
O Matrix Overview
 
MATLAB Assignment Service Research Help
MATLAB Assignment Service Research HelpMATLAB Assignment Service Research Help
MATLAB Assignment Service Research Help
 
Simple MATLAB Projects for Students Research Assistance
Simple MATLAB Projects for Students Research AssistanceSimple MATLAB Projects for Students Research Assistance
Simple MATLAB Projects for Students Research Assistance
 
URF Poster
URF PosterURF Poster
URF Poster
 
Matlab Projects for EEE Research Ideas
Matlab Projects for EEE Research IdeasMatlab Projects for EEE Research Ideas
Matlab Projects for EEE Research Ideas
 
Introduction to Microchip-SIMULINK Blocksets and MATLAB Plug-in for MPLAB® IDE
Introduction to Microchip-SIMULINK Blocksets and MATLAB Plug-in for MPLAB® IDEIntroduction to Microchip-SIMULINK Blocksets and MATLAB Plug-in for MPLAB® IDE
Introduction to Microchip-SIMULINK Blocksets and MATLAB Plug-in for MPLAB® IDE
 

Similar to MATLAB Intro for System Design & Simulation

MATLAB Assignment Help
MATLAB Assignment HelpMATLAB Assignment Help
MATLAB Assignment HelpEssay Corp
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introductionideas2ignite
 
MATLAB'S PRESENTS1.pptx
MATLAB'S  PRESENTS1.pptxMATLAB'S  PRESENTS1.pptx
MATLAB'S PRESENTS1.pptxNikhilPadole5
 
What is the Use of the Simulink Function in Matlab Assignment.pptx
What is the Use of the Simulink Function in Matlab Assignment.pptxWhat is the Use of the Simulink Function in Matlab Assignment.pptx
What is the Use of the Simulink Function in Matlab Assignment.pptxAssignment.World
 
Introduction To MATLAB
Introduction To MATLABIntroduction To MATLAB
Introduction To MATLABArmanGupta10
 
MATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.pptMATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.pptssuserdee4d8
 
Summer training in matlab
Summer training in matlabSummer training in matlab
Summer training in matlabArshit Rai
 
Summer training introduction to matlab
Summer training  introduction to matlabSummer training  introduction to matlab
Summer training introduction to matlabArshit Rai
 
Introduction to MATLAB in 8 Minutes
Introduction to MATLAB in 8 Minutes Introduction to MATLAB in 8 Minutes
Introduction to MATLAB in 8 Minutes Simplilearn
 
Basics of matlab i
Basics of matlab iBasics of matlab i
Basics of matlab issusera9e62b
 
Introduction to Matlab for Engineering Students.pdf
Introduction to Matlab for Engineering Students.pdfIntroduction to Matlab for Engineering Students.pdf
Introduction to Matlab for Engineering Students.pdfDrAzizulHasan1
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introductionAmeen San
 
MATLAB_CIS601-03.ppt
MATLAB_CIS601-03.pptMATLAB_CIS601-03.ppt
MATLAB_CIS601-03.pptaboma2hawi
 
IEEE Papers on Image Processing
IEEE Papers on Image ProcessingIEEE Papers on Image Processing
IEEE Papers on Image ProcessingE2MATRIX
 

Similar to MATLAB Intro for System Design & Simulation (20)

MATLAB Assignment Help
MATLAB Assignment HelpMATLAB Assignment Help
MATLAB Assignment Help
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
MATLAB'S PRESENTS1.pptx
MATLAB'S  PRESENTS1.pptxMATLAB'S  PRESENTS1.pptx
MATLAB'S PRESENTS1.pptx
 
What is the Use of the Simulink Function in Matlab Assignment.pptx
What is the Use of the Simulink Function in Matlab Assignment.pptxWhat is the Use of the Simulink Function in Matlab Assignment.pptx
What is the Use of the Simulink Function in Matlab Assignment.pptx
 
Matlab demo
Matlab demoMatlab demo
Matlab demo
 
++Matlab 14 sesiones
++Matlab 14 sesiones++Matlab 14 sesiones
++Matlab 14 sesiones
 
Introduction To MATLAB
Introduction To MATLABIntroduction To MATLAB
Introduction To MATLAB
 
MATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.pptMATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.ppt
 
All About MATLAB
All About MATLABAll About MATLAB
All About MATLAB
 
Summer training in matlab
Summer training in matlabSummer training in matlab
Summer training in matlab
 
Summer training introduction to matlab
Summer training  introduction to matlabSummer training  introduction to matlab
Summer training introduction to matlab
 
MATLAB INTRODUCTION
MATLAB INTRODUCTIONMATLAB INTRODUCTION
MATLAB INTRODUCTION
 
Introduction to MATLAB in 8 Minutes
Introduction to MATLAB in 8 Minutes Introduction to MATLAB in 8 Minutes
Introduction to MATLAB in 8 Minutes
 
Basics of matlab i
Basics of matlab iBasics of matlab i
Basics of matlab i
 
Introduction to Matlab for Engineering Students.pdf
Introduction to Matlab for Engineering Students.pdfIntroduction to Matlab for Engineering Students.pdf
Introduction to Matlab for Engineering Students.pdf
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Matlab.pdf
Matlab.pdfMatlab.pdf
Matlab.pdf
 
MATLAB_CIS601-03.ppt
MATLAB_CIS601-03.pptMATLAB_CIS601-03.ppt
MATLAB_CIS601-03.ppt
 
IEEE Papers on Image Processing
IEEE Papers on Image ProcessingIEEE Papers on Image Processing
IEEE Papers on Image Processing
 

Recently uploaded

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 

Recently uploaded (20)

CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 

MATLAB Intro for System Design & Simulation

  • 1. Introduction to MATLAB 18/11/2021 Mrs.G.Kalaiarasi Associate Professor Department of ECE Jai Shriram Engineering College Tirupur
  • 2. INTRODUCTION 18/11/2021  Cleve molar in 1984, Mathworks inc  Introduced as a simulation tool  Supports Graphical Programming  Can be interfaced with other High Level languages
  • 3. WHAT IS MATLAB? MATLAB is a program for doing numerical computation. It was originally designed for solving linear algebraic type problems using matrices. It’s name is derived from MATrix LABoratory Difference between C and Matlab Inbuilt Functions in Matlab (Application Oriented) User friendly syntax Fourth generation Programming Language tool 18/11/2021
  • 4. FEATURES MATLAB is a software package for high performance numerical computation and visualization Manipulating and plotting data Especially large data sets Scientific computing Dynamic system modeling System design 18/11/2021
  • 5. FEATURES cont.. MATLAB provides an interactive environment with hundreds of reliable and accurate built-in mathematical functions Mathematical problems including matrix algebra, complex arithmetic, linear systems, differential equations, signal processing, optimization, nonlinear systems, etc., The most important feature of MATLAB is its programming capability, which is very easy to learn and to use, and also allows user-developed functions 18/11/2021
  • 6. MEMORY ALLOCATION No need for types. i.e., All variables are created with double precision unless specified and they are matrices. 18/11/2021 int a; double b; float c; Example: >>x=5; >>x1=2;
  • 7. DEVELOPMENT TOOLS MATLAB Editor Code Analyzer MATLAB Profiler Directory Report 18/11/2021
  • 8. EDITOR WINDOW 18/11/2021 Click to create a new M-File  Extension “.m”  A text file containing script or function or program to run edit<space> <function name> • To understand the code sequence • Editing can‘t be done for some Functions
  • 10. CODE ANALYZER • It helps in debugging the error • Types of errors 1. Functional error linespace instead of linspace 18/11/2021 Error How to Avoid? Functional Error
  • 11. CODE ANALYZER 2. Syntax Error imread(“___”) instead of imread(‘___’) 18/11/2021 Error How to Avoid? Contd…
  • 12. CODE ANALYZER 3. Logical Error 18/11/2021 Contd… User should handle this kind of logic errors
  • 13. SIMULINK SIMULINK is a graphical mouse-driven program for the simulation of dynamic systems. SIMULINK enables students to simulate linear, as well as nonlinear, systems easily and efficiently. 18/11/2021
  • 14. AND OPERATION 18/11/2021 Text Based  A=1  B=0  M=A&B  R=A|B SIMULINK
  • 15. MATLAB WINDOWS Command window Figure window Editor window Help window Workspace window Current directory window 18/11/2021
  • 16. MATLAB WINDOWS • Command Window – type commands • Current Directory – View folders and m-files • Workspace – View program variables – Double click on a variable to see it in the Array Editor • Command History – view past commands – save a whole session using diary 18/11/2021
  • 17. MATLAB as a calculator 18/11/2021 BASIC MATLAB FUNCTIONS
  • 18. VECTORS a = [1 2 3 4 5 6 9 8 7] ; t = 0:2:20 t = 0 2 4 6 8 10 12 14 16 18 20 b = a + 2 b = 3 4 5 6 7 8 11 10 9 c = a + b c = 4 6 8 10 12 14 20 18 16 18/11/2021
  • 19. MATRICES B = [1 2 3 4;5 6 7 8;9 10 11 12] ; B = 1 2 3 4 5 6 7 8 9 10 11 12 C = B' C = 1 5 9 2 6 10 3 7 11 4 8 12 18/11/2021
  • 20. BASIC MATRIX OPERATORS X = inv(E) ;%INVERSE OF THE MATRIX [A,H] = eig(E) %eigen value &vector p = poly(E) %polynomial c = abs(y) ; D=min(a); D=max(a); Convolution x = [1 2]; y = [1 4 8]; z = conv(x,y) [xx, R] = deconv(z,y) 18/11/2021
  • 21. PLOT t=0:0.25:7; y = sin(t); plot(t,y) ; xlabel('x axis'); ylabel('y axis'); title('Heading'); grid on; gtext('text'); 18/11/2021
  • 22. AN AUDIO AND VIDEO FILE a =wavread('test.wav'); wavplay(a,44100); Plot(a); a=aviread('movie.avi') movie(a); 18/11/2021
  • 23. Conserve our forests, wildlife and the water bodies to Save our MOTHER EARTH 18/11/2021