SlideShare a Scribd company logo
Introduction to
MATLAB
Chris Diduch
University of New Brunswick
January 31 – February 4, 2004
Royal Bhutan University
RBIT, Rinchending
Day-1
Who is your instructor?
Chris Diduch
Professor
Electrical and Computer Engineering
University of New Brunswick
Fredericton, Canada, E3B 5A3
diduch@unb.ca
Research Interests
 Control systems,
 Computer control systems
 Failure detection and isolation
 Embedded and real time systems
 Applications: control of electric drives,
robotics, injection molding machines,
distributed power systems.
Courses
 Electricity and magnetism, circuits, systems
dynamics, microprocessors, embedded systems
and digital interfacing, robotics, real time
systems, VLSI design
 Advanced control systems, computer control
systems
What is MATLAB?
 MATrix LABoratory
 Originated as a vehicle for teaching and applying
linear algebra and numerical methods.
 Rapid analysis, design and prototyping.
 Arrays are the basic data type.
 Built-in functions are optimized for vector operations.
z=x*y z=[]
for i=1:5
z=z+x[i]*y[i]
end
MATLAB
MATLAB Toolboxes
Signal Processing
Neural Networks
Communications
Image Processing …
Programming
Language
Graphics
2D
3D
Color
Lighting
Animation…
External Files
Fortran and C…
Computation
Linear
Algebra
Data Analysis
Sig Process
Polynomials
Integration
ODE's …
3rd Party
Toolboxes
Robotics
Robot
Vision …
Physical IO
Analog
Digital …
Simulink
Stateflow
RT Workshop
Data Acquisition
xPC Target
Built-in Functions User-written Functions
Features of MATLAB
 The MATLAB programming language
 Built-in MATLAB functions
 Graphics
 Linear algebra
 Data analysis
 Signal processing
 Polynomials and interpolation
 Numerically solving differential equations
 External interfaces: C, Fortran
The Student Edition of
MATLAB
 MATLAB Toolboxes
 Simulink
 Signal Processing Toolbox
 Symbolic Math Toolbox
 Where Do I Get MATLAB? On-line Help?
www.mathworks.com
MATLAB Windows
 Launchpad Window (I call it the MATLAB
window)
 Command Window
 Workspace Window
 Command History Window
 Current Directory Window
 Edit Window
 Graphics Window
Help and Assistance
 command lookfor
 command help
 command helpwin
 command helpdesk
 command demo
MATLAB Data Types
 Basic type is the array
 Dimensioning is automatic
 Data objects:
 integers
 double
 matrices
 character (or text) strings
 structures
 cells
Display and Formatting
 MATLAB is case sensitive
 A semi-colon at the end of a line suppresses
screen output
 To display one page at a time type more on
 Display formats:
 short
 long
 e, g, hex
 rat, bank
MATLAB File Types
 M-files: scripts and functions are saved as
text files with a .m extension
 Mat-files: workspace variables are saves as
binary files with a .mat extension.
 Mex-files: MATLAB callable Fortran and C
programs with a .mex extension.
 Fig-files: the saved form of a figure window.
Where do we use MATLAB?
 Linear Algebra MATH 1503
 Simulation & Analysis CMPE 2013
 Systems and Control EE 3313, EE 3323
 Signals EE 3513, Industrial Control EE 4343
 Robotics EE 4353
 Power Systems EE 4411
 Algorithms in Real Time CMPE 4543
 Research and Graduate courses
On-line Help
 help FunctionName or ScriptName
 help help
 lookfor Name
 demo
 helpwin
 helpdesk
Overview
 MATLAB windows and basic operations
 Programming in MATLAB
 Analysis
 Graphics
 Toolboxes
On-line Course Material
 The workbook and all of the program
examples are available on-line at:
 http://www.ece.unb.ca/Courses/Matlab/CD
Element-by-Element
Operations
 Use dot operation for element-by-element
operations
 .* ./ .^
 A = [a1 a2 a3]
 B = [b1 b2 b3]
 C = A .op B says
 C= [a1 op b1, a2 op b2, a3 op b3]
Syntax
 sin2(t) sin(t)^2
Matrices











)
4
,
3
(
)
3
,
3
(
)
2
,
3
(
)
1
,
3
(
)
4
,
2
(
)
3
,
2
(
)
2
,
2
(
)
1
,
2
(
)
4
,
1
(
)
3
,
1
(
)
2
,
1
(
)
1
,
1
(
A
A
A
A
A
A
A
A
A
A
A
A
A
Column
Row
Trajectory of a Projectile
θ
H
y
x
v0
v(t)
MATLAB Path and PWD
 PWD: present working directory
 Default is: /matlab/path
 The MATLAB path:
 All MATLAB directories are included in the
search path.
 You may add paths to your directories
For First Time Users
 Issues
 Not being in the right directory
 Not saving files in the right directory
 Not updating an existing function or script file
while editing.
 Default working directory is
…/MATLAB/WORK

More Related Content

Similar to Matlab.ppt

MATLAB Thesis for Students
MATLAB Thesis for StudentsMATLAB Thesis for Students
MATLAB Thesis for Students
Phdtopiccom
 
Machine learning on streams of data
Machine learning on streams of dataMachine learning on streams of data
Machine learning on streams of data
Tomasz Sosiński
 
Computer organiztion1
Computer organiztion1Computer organiztion1
Computer organiztion1Umang Gupta
 
Summer training introduction to matlab
Summer training  introduction to matlabSummer training  introduction to matlab
Summer training introduction to matlab
Arshit Rai
 
Cse 7 softcomputing lab
Cse 7 softcomputing labCse 7 softcomputing lab
Cse 7 softcomputing lab
Vivek Kumar Sinha
 
Computer Organisation and Architecture Teaching Trends
Computer Organisation and Architecture Teaching TrendsComputer Organisation and Architecture Teaching Trends
Computer Organisation and Architecture Teaching Trends
yogesh1617
 
Computer Oraganisation and Architecture
Computer Oraganisation and ArchitectureComputer Oraganisation and Architecture
Computer Oraganisation and Architectureyogesh1617
 
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Anubhav Jain
 
Face Detection And Tracking
Face Detection And TrackingFace Detection And Tracking
Face Detection And Tracking
NarayanlalMenariya
 
Workshop proposal
Workshop proposalWorkshop proposal
Parallel Computing 2007: Overview
Parallel Computing 2007: OverviewParallel Computing 2007: Overview
Parallel Computing 2007: Overview
Geoffrey Fox
 
Lessons Learned from Building Machine Learning Software at Netflix
Lessons Learned from Building Machine Learning Software at NetflixLessons Learned from Building Machine Learning Software at Netflix
Lessons Learned from Building Machine Learning Software at Netflix
Justin Basilico
 
Matlab rugular and summer training programme in waayoo.com
Matlab rugular and summer training programme in waayoo.comMatlab rugular and summer training programme in waayoo.com
Matlab rugular and summer training programme in waayoo.com
Praveen Pandey
 
Matlab lecture
Matlab lectureMatlab lecture
Matlab lecture
Yatendra Vashishtha
 
An Efficient Hardware Implementation of Canny Edge Detection Algorithm
An Efficient Hardware Implementation of Canny Edge Detection AlgorithmAn Efficient Hardware Implementation of Canny Edge Detection Algorithm
An Efficient Hardware Implementation of Canny Edge Detection Algorithm
ijtsrd
 
Matlab demo
Matlab demoMatlab demo
Matlab demo
Munazir Ali
 
MSc CST (5yr Integrated Course ) Syllabus - Madras University
MSc CST (5yr Integrated Course ) Syllabus - Madras UniversityMSc CST (5yr Integrated Course ) Syllabus - Madras University
MSc CST (5yr Integrated Course ) Syllabus - Madras University
Griffinder VinHai
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
Dun Automation Academy
 
Artificial Intelligence and Deep Learning in Azure, CNTK and Tensorflow
Artificial Intelligence and Deep Learning in Azure, CNTK and TensorflowArtificial Intelligence and Deep Learning in Azure, CNTK and Tensorflow
Artificial Intelligence and Deep Learning in Azure, CNTK and Tensorflow
Jen Stirrup
 

Similar to Matlab.ppt (20)

MATLAB Thesis for Students
MATLAB Thesis for StudentsMATLAB Thesis for Students
MATLAB Thesis for Students
 
Machine learning on streams of data
Machine learning on streams of dataMachine learning on streams of data
Machine learning on streams of data
 
Computer organiztion1
Computer organiztion1Computer organiztion1
Computer organiztion1
 
Summer training introduction to matlab
Summer training  introduction to matlabSummer training  introduction to matlab
Summer training introduction to matlab
 
Par com
Par comPar com
Par com
 
Cse 7 softcomputing lab
Cse 7 softcomputing labCse 7 softcomputing lab
Cse 7 softcomputing lab
 
Computer Organisation and Architecture Teaching Trends
Computer Organisation and Architecture Teaching TrendsComputer Organisation and Architecture Teaching Trends
Computer Organisation and Architecture Teaching Trends
 
Computer Oraganisation and Architecture
Computer Oraganisation and ArchitectureComputer Oraganisation and Architecture
Computer Oraganisation and Architecture
 
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...Evaluating Machine Learning Algorithms for Materials Science using the Matben...
Evaluating Machine Learning Algorithms for Materials Science using the Matben...
 
Face Detection And Tracking
Face Detection And TrackingFace Detection And Tracking
Face Detection And Tracking
 
Workshop proposal
Workshop proposalWorkshop proposal
Workshop proposal
 
Parallel Computing 2007: Overview
Parallel Computing 2007: OverviewParallel Computing 2007: Overview
Parallel Computing 2007: Overview
 
Lessons Learned from Building Machine Learning Software at Netflix
Lessons Learned from Building Machine Learning Software at NetflixLessons Learned from Building Machine Learning Software at Netflix
Lessons Learned from Building Machine Learning Software at Netflix
 
Matlab rugular and summer training programme in waayoo.com
Matlab rugular and summer training programme in waayoo.comMatlab rugular and summer training programme in waayoo.com
Matlab rugular and summer training programme in waayoo.com
 
Matlab lecture
Matlab lectureMatlab lecture
Matlab lecture
 
An Efficient Hardware Implementation of Canny Edge Detection Algorithm
An Efficient Hardware Implementation of Canny Edge Detection AlgorithmAn Efficient Hardware Implementation of Canny Edge Detection Algorithm
An Efficient Hardware Implementation of Canny Edge Detection Algorithm
 
Matlab demo
Matlab demoMatlab demo
Matlab demo
 
MSc CST (5yr Integrated Course ) Syllabus - Madras University
MSc CST (5yr Integrated Course ) Syllabus - Madras UniversityMSc CST (5yr Integrated Course ) Syllabus - Madras University
MSc CST (5yr Integrated Course ) Syllabus - Madras University
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Artificial Intelligence and Deep Learning in Azure, CNTK and Tensorflow
Artificial Intelligence and Deep Learning in Azure, CNTK and TensorflowArtificial Intelligence and Deep Learning in Azure, CNTK and Tensorflow
Artificial Intelligence and Deep Learning in Azure, CNTK and Tensorflow
 

Recently uploaded

Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
01-GPON Fundamental fttx ftth basic .pptx
01-GPON Fundamental fttx ftth basic .pptx01-GPON Fundamental fttx ftth basic .pptx
01-GPON Fundamental fttx ftth basic .pptx
benykoy2024
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
dxobcob
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Ethernet Routing and switching chapter 1.ppt
Ethernet Routing and switching chapter 1.pptEthernet Routing and switching chapter 1.ppt
Ethernet Routing and switching chapter 1.ppt
azkamurat
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 

Recently uploaded (20)

Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
01-GPON Fundamental fttx ftth basic .pptx
01-GPON Fundamental fttx ftth basic .pptx01-GPON Fundamental fttx ftth basic .pptx
01-GPON Fundamental fttx ftth basic .pptx
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Ethernet Routing and switching chapter 1.ppt
Ethernet Routing and switching chapter 1.pptEthernet Routing and switching chapter 1.ppt
Ethernet Routing and switching chapter 1.ppt
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 

Matlab.ppt

  • 1. Introduction to MATLAB Chris Diduch University of New Brunswick January 31 – February 4, 2004 Royal Bhutan University RBIT, Rinchending Day-1
  • 2. Who is your instructor? Chris Diduch Professor Electrical and Computer Engineering University of New Brunswick Fredericton, Canada, E3B 5A3 diduch@unb.ca
  • 3. Research Interests  Control systems,  Computer control systems  Failure detection and isolation  Embedded and real time systems  Applications: control of electric drives, robotics, injection molding machines, distributed power systems.
  • 4. Courses  Electricity and magnetism, circuits, systems dynamics, microprocessors, embedded systems and digital interfacing, robotics, real time systems, VLSI design  Advanced control systems, computer control systems
  • 5. What is MATLAB?  MATrix LABoratory  Originated as a vehicle for teaching and applying linear algebra and numerical methods.  Rapid analysis, design and prototyping.  Arrays are the basic data type.  Built-in functions are optimized for vector operations. z=x*y z=[] for i=1:5 z=z+x[i]*y[i] end
  • 6. MATLAB MATLAB Toolboxes Signal Processing Neural Networks Communications Image Processing … Programming Language Graphics 2D 3D Color Lighting Animation… External Files Fortran and C… Computation Linear Algebra Data Analysis Sig Process Polynomials Integration ODE's … 3rd Party Toolboxes Robotics Robot Vision … Physical IO Analog Digital … Simulink Stateflow RT Workshop Data Acquisition xPC Target Built-in Functions User-written Functions
  • 7. Features of MATLAB  The MATLAB programming language  Built-in MATLAB functions  Graphics  Linear algebra  Data analysis  Signal processing  Polynomials and interpolation  Numerically solving differential equations  External interfaces: C, Fortran
  • 8. The Student Edition of MATLAB  MATLAB Toolboxes  Simulink  Signal Processing Toolbox  Symbolic Math Toolbox  Where Do I Get MATLAB? On-line Help? www.mathworks.com
  • 9. MATLAB Windows  Launchpad Window (I call it the MATLAB window)  Command Window  Workspace Window  Command History Window  Current Directory Window  Edit Window  Graphics Window
  • 10. Help and Assistance  command lookfor  command help  command helpwin  command helpdesk  command demo
  • 11. MATLAB Data Types  Basic type is the array  Dimensioning is automatic  Data objects:  integers  double  matrices  character (or text) strings  structures  cells
  • 12. Display and Formatting  MATLAB is case sensitive  A semi-colon at the end of a line suppresses screen output  To display one page at a time type more on  Display formats:  short  long  e, g, hex  rat, bank
  • 13. MATLAB File Types  M-files: scripts and functions are saved as text files with a .m extension  Mat-files: workspace variables are saves as binary files with a .mat extension.  Mex-files: MATLAB callable Fortran and C programs with a .mex extension.  Fig-files: the saved form of a figure window.
  • 14. Where do we use MATLAB?  Linear Algebra MATH 1503  Simulation & Analysis CMPE 2013  Systems and Control EE 3313, EE 3323  Signals EE 3513, Industrial Control EE 4343  Robotics EE 4353  Power Systems EE 4411  Algorithms in Real Time CMPE 4543  Research and Graduate courses
  • 15. On-line Help  help FunctionName or ScriptName  help help  lookfor Name  demo  helpwin  helpdesk
  • 16. Overview  MATLAB windows and basic operations  Programming in MATLAB  Analysis  Graphics  Toolboxes
  • 17. On-line Course Material  The workbook and all of the program examples are available on-line at:  http://www.ece.unb.ca/Courses/Matlab/CD
  • 18. Element-by-Element Operations  Use dot operation for element-by-element operations  .* ./ .^  A = [a1 a2 a3]  B = [b1 b2 b3]  C = A .op B says  C= [a1 op b1, a2 op b2, a3 op b3]
  • 21. Trajectory of a Projectile θ H y x v0 v(t)
  • 22. MATLAB Path and PWD  PWD: present working directory  Default is: /matlab/path  The MATLAB path:  All MATLAB directories are included in the search path.  You may add paths to your directories
  • 23. For First Time Users  Issues  Not being in the right directory  Not saving files in the right directory  Not updating an existing function or script file while editing.  Default working directory is …/MATLAB/WORK