Professional Documents
Culture Documents
• • Perform basic MATLAB commands that are essential in mathematical and algebraical
applications
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
MATLAB
• Stands for MATrix LABoratory
• A multi-paradigm numerical computing environment and
fourth-generation programming language.
• A proprietary programming language developed by MathWorks
• Current Release Version : R2022a
Sourced from: Wikipedia Publication Notice (2022).
This is a government work.
No part of this publication may be reproduced for profit without the
written permission of the Bulacan State University through its Innovation
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
MATLAB USED FOR:
1. Matrix manipulations
2. Plotting of functions and data
3. Implementation of algorithms
4. Creation of user interfaces
5. Interfacing with programs written in other languages, including C, C++,
C#, Java, Fortran and Python
6. Simulation Applications Sourced from: Wikipedia
Publication Notice (2022).
This is a government work.
No part of this publication may be reproduced for profit without the
written permission of the Bulacan State University through its Innovation
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
MATLAB ACCESS:
BulSU has acquired legit “MATLAB” subscription for the faculty and
students at the university via their google accounts (bulsu.edu.ph).
All students that have computer laboratories MUST be able to
register and install MATLAB for those who have computers.
Even those without computers can still use MATLAB online via
cellphone when registered.
Publication Notice (2022).
This is a government work.
No part of this publication may be reproduced for profit without the
written permission of the Bulacan State University through its Innovation
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
MATLAB ENVIRONMENT
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
MATLAB ENVIRONMENT
Current
Folder:
Shows the
current
directory that
MATLAB is
accessing.
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
MATLAB ENVIRONMENT
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
MATLAB ENVIRONMENT
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
MATLAB ENVIRONMENT
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND
WINDOW
There are two ways to
input command:
First one is without
semicolon
Let’s try :
1. Type command :
f=‘hello world’
2. Then press “Enter”
NOTICE:
The value of f is
assigned to a string of
characters (Strings).
Strings are input in
between apostrophes
(‘).
These (values) are
displayed immediately Publication Notice (2022).
This is a government work.
after pressing the No part of this publication may be reproduced for profit without the
written permission of the Bulacan State University through its Innovation
“Enter” key. Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND
WINDOW
There are two ways to
input command:
Second is with
semicolon ( ; )
Let’s try :
1. Type command:
g=‘hello world too’;
2. Then press “Enter”
NOTICE:
The value of g is also
assigned to a string of
characters.
But these (values) are
NOT displayed after
pressing “Enter”.
You are just moved to
the next line and Publication Notice (2022).
This is a government work.
prompted by “>>” No part of this publication may be reproduced for profit without the
written permission of the Bulacan State University through its Innovation
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND
WINDOW
DON’T WORRY g is still
assigned to the string
you typed.
DO :
1. Type command : g
2. Then press “Enter”
NOTICE:
The value of g is
displayed as output
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND
WINDOW
CLEARING THE COMMAND
WINDOW:
DO :
1. Type command : clc;
2. Then press “Enter”
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND
WINDOW
CLEARING THE COMMAND WINDOW:
DO :
1. Type command : clc;
2. Then press “Enter”
NOTICE: The screen is cleared of the previous display (including the latest one ; clc;)
This command works also without semicolon.
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND WINDOW:
NUMERICAL VALUES
Practically, we input numbers for
mathematical operations.
MATLAB at its simplest works
like a regular calculator.
However, you must type the
equation in a specific order or
hierarchy to get the right answer:
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND WINDOW:
NUMERICAL VALUES
Precedence or Hierarchy of
Operation from highest to lowest
1. Parenthesis
2. Negation
3. Exponent or Raising to a Power
4. Multiplication or Division
5. Addition or Subtraction
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND WINDOW:
NUMERICAL VALUES
Basic Mathematical Operation
1. Addition :+
2. Subtraction :–
3. Multiplication :*
4. Right Division : / (Normal Division – divides the numerator to the denominator)
5. Left Division : \ (Reverse Division – divides the denominator to the numerator)
6. Exponentiation : ^ (example: 83 : 8^3)
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND WINDOW:
NUMERICAL VALUES
Basic built-in Mathematical Functions
Note : n here will represent the number.
1. Square root : sqrt(n)
2. Exponentials : exp(n)
if n=1, you’ll get Euler’s number e = exp(1)= 2.7183
3. Absolute Value : abs(n)
4. Natural Logarithm : log(n)
5. Base 10 Logarithm : log10(n)
6. Factorial : factorial(n) Publication Notice (2022).
This is a government work.
No part of this publication may be reproduced for profit without the
written permission of the Bulacan State University through its Innovation
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND WINDOW:
NUMERICAL VALUES
Basic built-in Mathematical Functions
Note : n here will represent the angle in radians
1. Sine : sin(n) 1. Hyperbolic Sine : sinh(n)
2. Cosine : cos(n) 2. Hyperbolic Cosine : cosh(n)
3. Tangent : tan(n) 3. Hyperbolic Tangent : tanh(n)
4. Cotangent : cot(n) 4. Hyperbolic Cotangent : coth(n)
5. Secant : sec(n) 5. Hyperbolic Secant : sech(n)
6. Cosecant : csc(n) 6. Hyperbolic Cosecant : csch(n)
Publication Notice (2022).
This is a government work.
No part of this publication may be reproduced for profit without the
written permission of the Bulacan State University through its Innovation
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
USING
THE COMMAND WINDOW:
NUMERICAL VALUES
Basic built-in Mathematical Functions
Note : n here will represent the angle in degrees
1. Sine : sind(n)
2. Cosine : cosd(n)
3. Tangent : tand(n) No hyperbolics using degrees
4. Cotangent : cotd(n)
5. Secant : secd(n)
6. Cosecant : cscd(n)
Publication Notice (2022).
This is a government work.
No part of this publication may be reproduced for profit without the
written permission of the Bulacan State University through its Innovation
Work of Government (2022) Bulacan State University and Technology Support Office (ITSO).
You may reach the ITSO at the following
address: itso.rmo.rde@bulsu.edu.ph
ME406L
LABORATORY LEARNING MODULE : 1
GETTING TO KNOW MATLAB
© MATHWORKS