SlideShare une entreprise Scribd logo
1  sur  29
PRESENTATION ON MATLAB
contents
•Introduction to matlab
• Availability of matlab
•Difference between c and matlab
•Introduction to simulink
•Desktop Tools
•Variables
•3 Dimensional Plot
•Simple operations on vector and matrices
•Usage of if,for and while loops in matlab
•Functions and generating vectors from function
• Simulating a source
•Simple program to plot a sine wave
•Matlab application in commercially available nao robots.
•List of companies working on matlab
•Applications of matlab
Introduction
Cleve molar in 1984,
Mathworks inc
Introduced as a simulation tool
Supports Graphical
Programming
Can be interfaced with other
High Level languages
MATLAB INTRODUCTION
• Matlab is both computer programming
language and software environment for using
that language effectively.
• Matlab is matrix-oriented, so what would take
several statements in c or fortran can usually be
accomplished in just a few lines using matlab's
built-in matrix and vector operations
What is Matlab?
• Matlab is basically a high level language which
has many specialized toolboxes for making
things easier for us
• How high?
Assembly
High Level
Languages such as
C, Pascal etc.
Matlab
AVAILABILITY OF MATLAB
• Matlab is available for ms windows,
Macintosh personal computer, Unix and other
operating systems.
• MATLAB,which stands for MATRIX
LABORATPORY, is a powerful, general-purpose
system or environment for doing mathematics,
scientific and engireeng calculations.
Introduction to simulink
– Used to model, analyze and simulate dynamic
systems using block diagrams.
– Fully integrated with MATLAB , easy and fast to
learn and flexible.
– It has comprehensive block library which can be
used to simulate linear, non–linear or discrete
systems – excellent research tools.
– C codes can be generated from Simulink models for
embedded applications and rapid prototyping of
control systems.
Desktop Tools
• Command Window
– type commands
• Workspace
– view program variables
– clear to clear
– double click on a variable to see it in the Array Editor
• Command History
– view past commands
– save a whole session using diary
• Launch Pad
– access tools, demos and documentation
Change the current working directory
Variables
• No need for types. i.e.,
• All variables are created with double precision unless
specified and they are matrices.
• After these statements, the variables are 1x1 matrices with
double precision
int a;
double b;
float c;
Example:
>>x=5;
>>x1=2;
Data visualisation – plotting graphs
Example on mesh and surf – 3 dimensional plot
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
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
IF LOOP
a=6;
if a > 6
disp('a is greater');
elseif a==0
disp('a is zero');
else
disp('a is smaller');
end
FOR LOOP
a=5;
for i=1:5
a=a+1
end
disp(a);
ANS a =10
While Loop
a=5;
while a < 10
a=a+1;
end
disp(a);
Ans a =10
Function
function c=add(a,b);
c=a+b;
return
Main
a=5;
b=6;
c=add(a,b);
disp(c);
d=mul(a,b);
disp(d);
function c=mul(a,b);
c=a*b;
return
Generating Vectors from functions
• zeros(M,N) MxN matrix of zeros
• ones(M,N) MxN matrix of ones
• rand(M,N) MxN matrix of uniformly
distributed random
numbers on (0,1)
x = zeros(1,3)
x =
0 0 0
x = ones(1,3)
x =
1 1 1
x = rand(1,3)
x =
0.9501 0.2311 0.6068
Generate message signal (simple sine wave)
 Define time instants (1000 sample points)
tmin = 0; tmax = 10^(-3); step = (tmax-tmin)/1000;
t = tmin:step:tmax;
 Define amplitude and frequency (initial phase is zero)
Vm = 1; % Amplitude
fm = 2*10^3; % Frequency
 Construct the Signal
m = Vm*sin(2*pi*fm*t);
 View the Signal
plot(t,m,'r');
Simulate a Source
   tfVtm mm  2sin
Complete MATLAB Script [Prog1.m]
tmin = 0; tmax = 10^(-3); step = (tmax-tmin)/1000;
t = tmin:step:tmax;
fm = 2*10^3;
Vm = 1;
m = Vm*sin(2*pi*fm*t);
plot(t,m,'r');
Simulate a Source
Simulate a Source
PLOT
t=0:0.25:7;
y = sin(t);
plot(t,y) ;
xlabel('x axis');
ylabel('y axis');
title('Heading');
grid on;
gtext('text');
APPLICATION OF MATLAB IN ROBOTS
• The MATLAB NAO API enables you to control the
NAO robot via MATLAB and related toolboxes.
• The API enables MATLAB to send and receive
data asynchronously to the robot over a TCP/IP
link (wireless or wired) between the host PC and
the robot.
• For example, the API receives images taken by
the mounted cameras on NAO. it can use face
detection algorithms to identify faces in the
images.
• The API can then send a voice phrase, such as
the name of the person, to the speakers on NAO
or have the robot walk toward or away from
particular people.
• Programming NAO robot with just MATLAB
• Expand capabilities at any time with additional
toolboxes
• Work in the MATLAB environment for interactive
development and debugging
• Develop programs using NAO’s sensors (inputs) and
actuators (outputs) such as microphone, camera,
accelerometer, touch sensors, joint DC motors,
LEDs, and speakers
• Introduce electronics, mathematics, mechanics,
control, image processing, voice recognition,
navigation and more using MATLAB
List of Companies
• ADOBE (Photoshop)
• NASA
• GE
• L&T
• ROBERT BOSCH
Applications
• Aerospace
• Biometrics
• Medical
• Signal,Image,Audio and Video
• Neural networks,Fuzzy logic
• Animation
Matlab

Contenu connexe

Tendances

Basics of matlab
Basics of matlabBasics of matlab
Basics of matlabAnil Maurya
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlabaman gupta
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabMohan Raj
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLABBhavesh Shah
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabVidhyaSenthil
 
Brief Introduction to Matlab
Brief  Introduction to MatlabBrief  Introduction to Matlab
Brief Introduction to MatlabTariq kanher
 
How to work on Matlab.......
How to work on Matlab.......How to work on Matlab.......
How to work on Matlab.......biinoida
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introductionideas2ignite
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab IntroductionDaniel Moore
 
MATLAB Basics-Part1
MATLAB Basics-Part1MATLAB Basics-Part1
MATLAB Basics-Part1Elaf A.Saeed
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introductionAmeen San
 
Importance of matlab
Importance of matlabImportance of matlab
Importance of matlabkrajeshk1980
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLABRavikiran A
 
Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - IMatlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - IVijay Kumar Gupta
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLABAshish Meshram
 

Tendances (20)

Basics of matlab
Basics of matlabBasics of matlab
Basics of matlab
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
Matlab
MatlabMatlab
Matlab
 
MATLAB INTRODUCTION
MATLAB INTRODUCTIONMATLAB INTRODUCTION
MATLAB INTRODUCTION
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Brief Introduction to Matlab
Brief  Introduction to MatlabBrief  Introduction to Matlab
Brief Introduction to Matlab
 
Learn Matlab
Learn MatlabLearn Matlab
Learn Matlab
 
How to work on Matlab.......
How to work on Matlab.......How to work on Matlab.......
How to work on Matlab.......
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
MATLAB Basics-Part1
MATLAB Basics-Part1MATLAB Basics-Part1
MATLAB Basics-Part1
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Importance of matlab
Importance of matlabImportance of matlab
Importance of matlab
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - IMatlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - I
 
Matlab-fundamentals of matlab-2
Matlab-fundamentals of matlab-2Matlab-fundamentals of matlab-2
Matlab-fundamentals of matlab-2
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 

En vedette

MATLAB Assignment Help
MATLAB Assignment HelpMATLAB Assignment Help
MATLAB Assignment HelpEssay Corp
 
Matlab for Electrical Engineers
Matlab for Electrical EngineersMatlab for Electrical Engineers
Matlab for Electrical EngineersManish Joshi
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersAn Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersMurshida ck
 
Image proceesing with matlab
Image proceesing with matlabImage proceesing with matlab
Image proceesing with matlabAshutosh Shahi
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing FundamentalThuong Nguyen Canh
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingSahil Biswas
 

En vedette (11)

Matlab plotting
Matlab plottingMatlab plotting
Matlab plotting
 
MATLAB Assignment Help
MATLAB Assignment HelpMATLAB Assignment Help
MATLAB Assignment Help
 
MATLAB Programming
MATLAB Programming MATLAB Programming
MATLAB Programming
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab Presentation
Matlab PresentationMatlab Presentation
Matlab Presentation
 
Matlab for Electrical Engineers
Matlab for Electrical EngineersMatlab for Electrical Engineers
Matlab for Electrical Engineers
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersAn Introduction to MATLAB for beginners
An Introduction to MATLAB for beginners
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Image proceesing with matlab
Image proceesing with matlabImage proceesing with matlab
Image proceesing with matlab
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing Fundamental
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 

Similaire à Matlab

Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshopVinay Kumar
 
1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptxBeheraA
 
Introduction to Matlab.pdf
Introduction to Matlab.pdfIntroduction to Matlab.pdf
Introduction to Matlab.pdfssuser43b38e
 
MATLAB for Technical Computing
MATLAB for Technical ComputingMATLAB for Technical Computing
MATLAB for Technical ComputingNaveed Rehman
 
From zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyondFrom zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyondMahuaPal6
 
Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functionsjoellivz
 
COMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptxCOMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptximman gwu
 
Basic concept of MATLAB.ppt
Basic concept of MATLAB.pptBasic concept of MATLAB.ppt
Basic concept of MATLAB.pptaliraza2732
 
Dsp manual completed2
Dsp manual completed2Dsp manual completed2
Dsp manual completed2bilawalali74
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabDnyanesh Patil
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantssdharmesh69
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTtejas1235
 

Similaire à Matlab (20)

Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshop
 
1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx
 
Matlab Tutorial.ppt
Matlab Tutorial.pptMatlab Tutorial.ppt
Matlab Tutorial.ppt
 
MatlabIntro (1).ppt
MatlabIntro (1).pptMatlabIntro (1).ppt
MatlabIntro (1).ppt
 
Introduction to Matlab.pdf
Introduction to Matlab.pdfIntroduction to Matlab.pdf
Introduction to Matlab.pdf
 
MATLAB for Technical Computing
MATLAB for Technical ComputingMATLAB for Technical Computing
MATLAB for Technical Computing
 
Introduction to Matlab.ppt
Introduction to Matlab.pptIntroduction to Matlab.ppt
Introduction to Matlab.ppt
 
From zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyondFrom zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyond
 
Matlab-3.pptx
Matlab-3.pptxMatlab-3.pptx
Matlab-3.pptx
 
Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functions
 
Matlab1
Matlab1Matlab1
Matlab1
 
COMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptxCOMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptx
 
Basic concept of MATLAB.ppt
Basic concept of MATLAB.pptBasic concept of MATLAB.ppt
Basic concept of MATLAB.ppt
 
Es272 ch1
Es272 ch1Es272 ch1
Es272 ch1
 
Dsp manual completed2
Dsp manual completed2Dsp manual completed2
Dsp manual completed2
 
Matlab_Harshal.pptx
Matlab_Harshal.pptxMatlab_Harshal.pptx
Matlab_Harshal.pptx
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantss
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENT
 
Matlab lec1
Matlab lec1Matlab lec1
Matlab lec1
 

Dernier

+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...Health
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxnuruddin69
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stageAbc194748
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 

Dernier (20)

+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptx
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stage
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 

Matlab

  • 2. contents •Introduction to matlab • Availability of matlab •Difference between c and matlab •Introduction to simulink •Desktop Tools •Variables •3 Dimensional Plot •Simple operations on vector and matrices •Usage of if,for and while loops in matlab •Functions and generating vectors from function • Simulating a source •Simple program to plot a sine wave •Matlab application in commercially available nao robots. •List of companies working on matlab •Applications of matlab
  • 3. Introduction Cleve molar in 1984, Mathworks inc Introduced as a simulation tool Supports Graphical Programming Can be interfaced with other High Level languages
  • 4. MATLAB INTRODUCTION • Matlab is both computer programming language and software environment for using that language effectively. • Matlab is matrix-oriented, so what would take several statements in c or fortran can usually be accomplished in just a few lines using matlab's built-in matrix and vector operations
  • 5. What is Matlab? • Matlab is basically a high level language which has many specialized toolboxes for making things easier for us • How high? Assembly High Level Languages such as C, Pascal etc. Matlab
  • 6. AVAILABILITY OF MATLAB • Matlab is available for ms windows, Macintosh personal computer, Unix and other operating systems. • MATLAB,which stands for MATRIX LABORATPORY, is a powerful, general-purpose system or environment for doing mathematics, scientific and engireeng calculations.
  • 7. Introduction to simulink – Used to model, analyze and simulate dynamic systems using block diagrams. – Fully integrated with MATLAB , easy and fast to learn and flexible. – It has comprehensive block library which can be used to simulate linear, non–linear or discrete systems – excellent research tools. – C codes can be generated from Simulink models for embedded applications and rapid prototyping of control systems.
  • 8. Desktop Tools • Command Window – type commands • Workspace – view program variables – clear to clear – double click on a variable to see it in the Array Editor • Command History – view past commands – save a whole session using diary • Launch Pad – access tools, demos and documentation
  • 9. Change the current working directory
  • 10. Variables • No need for types. i.e., • All variables are created with double precision unless specified and they are matrices. • After these statements, the variables are 1x1 matrices with double precision int a; double b; float c; Example: >>x=5; >>x1=2;
  • 11. Data visualisation – plotting graphs Example on mesh and surf – 3 dimensional plot
  • 12. 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
  • 13. 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
  • 14. IF LOOP a=6; if a > 6 disp('a is greater'); elseif a==0 disp('a is zero'); else disp('a is smaller'); end
  • 16. While Loop a=5; while a < 10 a=a+1; end disp(a); Ans a =10
  • 18. Generating Vectors from functions • zeros(M,N) MxN matrix of zeros • ones(M,N) MxN matrix of ones • rand(M,N) MxN matrix of uniformly distributed random numbers on (0,1) x = zeros(1,3) x = 0 0 0 x = ones(1,3) x = 1 1 1 x = rand(1,3) x = 0.9501 0.2311 0.6068
  • 19. Generate message signal (simple sine wave)  Define time instants (1000 sample points) tmin = 0; tmax = 10^(-3); step = (tmax-tmin)/1000; t = tmin:step:tmax;  Define amplitude and frequency (initial phase is zero) Vm = 1; % Amplitude fm = 2*10^3; % Frequency  Construct the Signal m = Vm*sin(2*pi*fm*t);  View the Signal plot(t,m,'r'); Simulate a Source    tfVtm mm  2sin
  • 20. Complete MATLAB Script [Prog1.m] tmin = 0; tmax = 10^(-3); step = (tmax-tmin)/1000; t = tmin:step:tmax; fm = 2*10^3; Vm = 1; m = Vm*sin(2*pi*fm*t); plot(t,m,'r'); Simulate a Source
  • 22. PLOT t=0:0.25:7; y = sin(t); plot(t,y) ; xlabel('x axis'); ylabel('y axis'); title('Heading'); grid on; gtext('text');
  • 23.
  • 24. APPLICATION OF MATLAB IN ROBOTS • The MATLAB NAO API enables you to control the NAO robot via MATLAB and related toolboxes. • The API enables MATLAB to send and receive data asynchronously to the robot over a TCP/IP link (wireless or wired) between the host PC and the robot. • For example, the API receives images taken by the mounted cameras on NAO. it can use face detection algorithms to identify faces in the images. • The API can then send a voice phrase, such as the name of the person, to the speakers on NAO or have the robot walk toward or away from particular people.
  • 25. • Programming NAO robot with just MATLAB • Expand capabilities at any time with additional toolboxes • Work in the MATLAB environment for interactive development and debugging • Develop programs using NAO’s sensors (inputs) and actuators (outputs) such as microphone, camera, accelerometer, touch sensors, joint DC motors, LEDs, and speakers • Introduce electronics, mathematics, mechanics, control, image processing, voice recognition, navigation and more using MATLAB
  • 26.
  • 27. List of Companies • ADOBE (Photoshop) • NASA • GE • L&T • ROBERT BOSCH
  • 28. Applications • Aerospace • Biometrics • Medical • Signal,Image,Audio and Video • Neural networks,Fuzzy logic • Animation