SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot (20)

Matlab Workshop Presentation
Matlab Workshop PresentationMatlab Workshop Presentation
Matlab Workshop Presentation
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
MATLAB INTRODUCTION
MATLAB INTRODUCTIONMATLAB INTRODUCTION
MATLAB INTRODUCTION
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Matlab tme series benni
Matlab tme series benniMatlab tme series benni
Matlab tme series benni
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Introduction to MatLab programming
Introduction to MatLab programmingIntroduction to MatLab programming
Introduction to MatLab programming
 
Matlab for diploma students(1)
Matlab for diploma students(1)Matlab for diploma students(1)
Matlab for diploma students(1)
 
Matlab basic and image
Matlab basic and imageMatlab basic and image
Matlab basic and image
 
MATLAB Programming
MATLAB Programming MATLAB Programming
MATLAB Programming
 
Basic matlab and matrix
Basic matlab and matrixBasic matlab and matrix
Basic matlab and matrix
 
Importance of matlab
Importance of matlabImportance of matlab
Importance of matlab
 
How to work on Matlab.......
How to work on Matlab.......How to work on Matlab.......
How to work on Matlab.......
 
MatLab Basic Tutorial On Plotting
MatLab Basic Tutorial On PlottingMatLab Basic Tutorial On Plotting
MatLab Basic Tutorial On Plotting
 
MATLAB - The Need to Know Basics
MATLAB - The Need to Know BasicsMATLAB - The Need to Know Basics
MATLAB - The Need to Know Basics
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Learn Matlab
Learn MatlabLearn Matlab
Learn Matlab
 
What is matlab
What is matlabWhat is matlab
What is matlab
 
Matlab Basic Tutorial
Matlab Basic TutorialMatlab Basic Tutorial
Matlab Basic Tutorial
 

Similar to 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 matlabVidhyaSenthil
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantssdharmesh69
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTtejas1235
 

Similar to 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
 
Matlab
MatlabMatlab
Matlab
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantss
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENT
 

Recently uploaded

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
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
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
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 
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
 
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
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
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
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 

Recently uploaded (20)

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...
 
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
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
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
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
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
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 
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 ≽ 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)
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
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...
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 

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