SlideShare a Scribd company logo
EngMahmoud Hussein
 Mathematics and computation.
 Analyze data.
 Develop algorithms
 Do simulation and modeling
 Produce graphical displays and graphical user interfaces.
 MATLAB is an interactive system whose basic data element is an array
that does not require dimensioning..
MATLAB is a software package that lets
you do:
 MATLAB is an interactive system for doing numerical computations.
 Powerful operations can be performed using just one or two
commands.
 Powerful operations can be performed using just one or two
commands.
Easily ……………..
Course content suggest
???????????
Lets Start
 Please open MATLAB:
Development Environment.
MATLAB Desktop.
Calculator Mode.(basic math operations *,/,+,-,A)
Get Help ?
Variables in matlab
Notes
 MATLAB is case sensitive.
 MATLAB can handle integer, real, and complex variables.
 Format: How MATLAB prints numbers
controlled by the "format" command
Try it!
Phi=(1+sqrt(6))/2
Managing your workspace
Command Window Management
 One often does not want to see the result of intermediate calculations.
 terminate the assignment statement or expression with semi–colon
 >>x=3; y=6;
 >>
 Note also we can place several statements on one line, separated by
commas or semi-colon.
 Clc command :Clear command window
 Up and down recall previous command.
Mathematical Function
Mathematical Function
Mathematical Function
 Exponential Function
Vectors
MATLAB has two forms of vectors:
 Row vectors
 Column vector
 Row vectors: they are lists of numbers separated by either commas or
spaces.
 The number of entries is known as the"length" of the vector The
entries must be enclosed in square brackets.
v=[1 3,sqrt(25)];
Vectors
 Examples:
 v = [ 1 3, sqrt(5)]
 v2 = [3+ 4 5]
 v3 = [3 +4 5] � is v2=v3 ?!!!!!
 We can do certain arithmetic operations with vectors of the same length
(v , v3)
 Try adding v and v2.
Vectors
Suppose we want a vector starting from 1 up to 100 with increments of
one (i.e. 1 2…100).
Write 100 elements � time consuming process.
 An easy way: v=[1:100].
 Generally a : b : c produces a vector of entries
 Starting with the value a,
 Incrementing by the value b
 Until it gets to c.
 Example: 0.32:0.1:0.6
Vectors
 So far, we have two methods for declaration:
 X=[element1 element2 element3 ……. ]
 (start : step : end)
 Another declaration of the vector is:
 Z=linspace(O,1O,11) � (start, end, no. of points)
 Linear space
 Increment = (end - start)/(N-1)
 If X is a vector, then Y=sin(X), is also a vector with the same dimensions.
this direct relation between x,y
Extracting of bits vectors
 Assume r = [1:2:6, -1:-2:-7];
 To get the 3rd to 6th entries:
r(3:6)
What does r (6:-2:1) give?

More Related Content

PPTX
Lecture three
PPTX
Lecture two
PPTX
PPTX
Lectue five
PPTX
Introduction to matlab lecture 2 of 4
PPTX
2D Plot Matlab
PPTX
Introduction to matlab lecture 3 of 4
PPTX
Introduction to matlab lecture 4 of 4
Lecture three
Lecture two
Lectue five
Introduction to matlab lecture 2 of 4
2D Plot Matlab
Introduction to matlab lecture 3 of 4
Introduction to matlab lecture 4 of 4

What's hot (19)

PDF
Matlab practice
PDF
Matlab Graphics Tutorial
PPTX
Intro to Matlab programming
PPT
Bisection method in maths 4
PDF
MATLAB for Technical Computing
PPTX
Bisection method
PPT
Two dimensional array
PDF
Two dimensional array
PPTX
Bisection method
PDF
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
PDF
Sample presentation slides template
PDF
Matlab cheatsheet
PPTX
2D Array
PDF
5 octave tutorial
PDF
Digital communication lab lectures
PPTX
Intro to matlab
PPTX
Bisection Method
PPT
Multidimensional array in C
PPTX
2- Dimensional Arrays
Matlab practice
Matlab Graphics Tutorial
Intro to Matlab programming
Bisection method in maths 4
MATLAB for Technical Computing
Bisection method
Two dimensional array
Two dimensional array
Bisection method
Numerical Method Analysis: Algebraic and Transcendental Equations (Non-Linear)
Sample presentation slides template
Matlab cheatsheet
2D Array
5 octave tutorial
Digital communication lab lectures
Intro to matlab
Bisection Method
Multidimensional array in C
2- Dimensional Arrays
Ad

Viewers also liked (20)

PPTX
Robotics lecture 3
PPTX
Automation lecture 6
PPTX
Where are things in 3 d
PPTX
Where are things in 2 d
PPTX
Dh parameters robotics
PPTX
Automation lecture5
PPTX
Pneumatic control
PPTX
PPTX
Robotics lec 5
PPTX
Automation lec4
PPTX
Robotics lec 6
PPTX
Robotics lec7
PPTX
Forward kinematics
PPTX
Automation lecture1
PPTX
Automation lec4
PDF
Smart Mobility Policies with Evolutionary Algorithms: The Adapting Info Panel...
PPTX
Exposicindeesfera 160621020337
PDF
Rising Underwriting Capacity Driving The Asia Pacific Insurance Sector: Ken R...
PDF
PDF
Test Dependencies and the Future of Build Acceleration
Robotics lecture 3
Automation lecture 6
Where are things in 3 d
Where are things in 2 d
Dh parameters robotics
Automation lecture5
Pneumatic control
Robotics lec 5
Automation lec4
Robotics lec 6
Robotics lec7
Forward kinematics
Automation lecture1
Automation lec4
Smart Mobility Policies with Evolutionary Algorithms: The Adapting Info Panel...
Exposicindeesfera 160621020337
Rising Underwriting Capacity Driving The Asia Pacific Insurance Sector: Ken R...
Test Dependencies and the Future of Build Acceleration
Ad

Similar to Lecture one (20)

PDF
Matlab lec1
PDF
Lecture 01 variables scripts and operations
PPTX
Introduction to MATLAB Programming for Engineers
PPT
Introduction to Matlab - Basic Functions
PPT
Matlab Tutorial.ppt
PPT
MatlabIntro (1).ppt
PPT
matlab_tutorial.ppt
PPT
matlab_tutorial.ppt
PPT
matlab_tutorial.ppt
PDF
Basics of matlab
PPTX
An Introduction to MATLAB for beginners
PPT
Introduction of MatLab
PPT
Matlab anilkumar
PPTX
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
PDF
Matlab Tutorial for Beginners - I
PPT
MatlabIntro1234.ppt.....................
PPT
matlab tutorial with separate function description and handson learning
PDF
lecture #1 & 2....education....matlab...helpful
PPT
WIDI ediot autis dongok part 1.ediot lu lemot lu setan lu
PDF
MATLAB Programming
Matlab lec1
Lecture 01 variables scripts and operations
Introduction to MATLAB Programming for Engineers
Introduction to Matlab - Basic Functions
Matlab Tutorial.ppt
MatlabIntro (1).ppt
matlab_tutorial.ppt
matlab_tutorial.ppt
matlab_tutorial.ppt
Basics of matlab
An Introduction to MATLAB for beginners
Introduction of MatLab
Matlab anilkumar
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
Matlab Tutorial for Beginners - I
MatlabIntro1234.ppt.....................
matlab tutorial with separate function description and handson learning
lecture #1 & 2....education....matlab...helpful
WIDI ediot autis dongok part 1.ediot lu lemot lu setan lu
MATLAB Programming

More from Mahmoud Hussein (20)

PPTX
07 modelling.electric.motors
PPTX
Dc dc converter
PPTX
08 pid.controller
PPTX
06 control.systems
PPTX
05 tuning.pid.controllers
PPTX
02 physical.system.modelling mechanical.systems.
PPTX
03 dynamic.system.
PPTX
Lecture 02 laplace transformation
PPTX
Model based design-Hardware in loop-software in loop
PPTX
Ac drive basics
PPTX
Velocity kinematics
PPT
MPI Communication
PPT
PPT
Analogue Module
PPT
Function Block & Organization Block
PPT
Data Block
PPT
Declaration Table
PPT
Math operation
PPTX
Industrial communication
PPTX
Computer vision
07 modelling.electric.motors
Dc dc converter
08 pid.controller
06 control.systems
05 tuning.pid.controllers
02 physical.system.modelling mechanical.systems.
03 dynamic.system.
Lecture 02 laplace transformation
Model based design-Hardware in loop-software in loop
Ac drive basics
Velocity kinematics
MPI Communication
Analogue Module
Function Block & Organization Block
Data Block
Declaration Table
Math operation
Industrial communication
Computer vision

Recently uploaded (20)

PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Insiders guide to clinical Medicine.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
master seminar digital applications in india
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Basic Mud Logging Guide for educational purpose
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Pharma ospi slides which help in ospi learning
PDF
Classroom Observation Tools for Teachers
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
01-Introduction-to-Information-Management.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Insiders guide to clinical Medicine.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
2.FourierTransform-ShortQuestionswithAnswers.pdf
master seminar digital applications in india
GDM (1) (1).pptx small presentation for students
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPH.pptx obstetrics and gynecology in nursing
Basic Mud Logging Guide for educational purpose
Supply Chain Operations Speaking Notes -ICLT Program
O7-L3 Supply Chain Operations - ICLT Program
Module 4: Burden of Disease Tutorial Slides S2 2025
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Pharma ospi slides which help in ospi learning
Classroom Observation Tools for Teachers
Final Presentation General Medicine 03-08-2024.pptx
Cell Structure & Organelles in detailed.
VCE English Exam - Section C Student Revision Booklet
01-Introduction-to-Information-Management.pdf

Lecture one

  • 2.  Mathematics and computation.  Analyze data.  Develop algorithms  Do simulation and modeling  Produce graphical displays and graphical user interfaces.  MATLAB is an interactive system whose basic data element is an array that does not require dimensioning.. MATLAB is a software package that lets you do:
  • 3.  MATLAB is an interactive system for doing numerical computations.  Powerful operations can be performed using just one or two commands.  Powerful operations can be performed using just one or two commands. Easily ……………..
  • 5. Lets Start  Please open MATLAB: Development Environment. MATLAB Desktop. Calculator Mode.(basic math operations *,/,+,-,A) Get Help ?
  • 7. Notes  MATLAB is case sensitive.  MATLAB can handle integer, real, and complex variables.  Format: How MATLAB prints numbers controlled by the "format" command Try it! Phi=(1+sqrt(6))/2
  • 9. Command Window Management  One often does not want to see the result of intermediate calculations.  terminate the assignment statement or expression with semi–colon  >>x=3; y=6;  >>  Note also we can place several statements on one line, separated by commas or semi-colon.  Clc command :Clear command window  Up and down recall previous command.
  • 13. Vectors MATLAB has two forms of vectors:  Row vectors  Column vector  Row vectors: they are lists of numbers separated by either commas or spaces.  The number of entries is known as the"length" of the vector The entries must be enclosed in square brackets. v=[1 3,sqrt(25)];
  • 14. Vectors  Examples:  v = [ 1 3, sqrt(5)]  v2 = [3+ 4 5]  v3 = [3 +4 5] � is v2=v3 ?!!!!!  We can do certain arithmetic operations with vectors of the same length (v , v3)  Try adding v and v2.
  • 15. Vectors Suppose we want a vector starting from 1 up to 100 with increments of one (i.e. 1 2…100). Write 100 elements � time consuming process.  An easy way: v=[1:100].  Generally a : b : c produces a vector of entries  Starting with the value a,  Incrementing by the value b  Until it gets to c.  Example: 0.32:0.1:0.6
  • 16. Vectors  So far, we have two methods for declaration:  X=[element1 element2 element3 ……. ]  (start : step : end)  Another declaration of the vector is:  Z=linspace(O,1O,11) � (start, end, no. of points)  Linear space  Increment = (end - start)/(N-1)  If X is a vector, then Y=sin(X), is also a vector with the same dimensions. this direct relation between x,y
  • 17. Extracting of bits vectors  Assume r = [1:2:6, -1:-2:-7];  To get the 3rd to 6th entries: r(3:6) What does r (6:-2:1) give?