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

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 

Recently uploaded (20)

DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 

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