Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1
MATLAB® Familiarization
Fe Shannen B. Cinco
Brgy. Canjulao, Lapu-Lapu, 6015 Cebu, Philippines
feshannenc@.gmail.com
+
Department of Electrical and Electronics Engineering, University of San Carlos
Talamban Campus, Nasipit, Talamban, Cebu City, 6000 Philippines
Abstract— This report intents the primary use of a programming The command will be processed by pressing the
platform, MATLAB. It stands for matrix laboratory, a Enter key. To do a simple mathematical calculation,
programming language and a numerical computing application ‘2+5’was typed at the prompt. After hitting the Enter
with access to symbolic computing abilities. Evidently, equipped key, MATLAB will display the result.
by engineers and scientist where they can express problems and
2. A semicolon was used after the command in order to
solutions in a familiar mathematical notation. The experiment
provides a mere introduction unto how the platform function and suppress the display of the output.
the adaptation to its applications to the solution of problems that 3. MATLAB variable names can be composed of letters,
arises in the analysis and design of feedback systems. It aims to numbers and the underscore character. The first
help the use understand through a step-by-step process of character however should be a letter.
learning unto the basic commands, matrices, and plot functions. 4. The command whos was typed so as to view the
Hence, the level of familiarization to the basic functions of this variables in the MATLAB workspace. Also, clear
programming language will serve as the basis of output to this which allows to remove all variables in the
experiment. workspace and clc to clear the screen.
5. MATLAB has built-in variables like pi (π), i and j.
Keywords— mathematical notation, MATLAB, matrices, These built-in variables or keywords (enter
numerical computing, plot functions.
iskeyword in the command window) should not be
I. INTRODUCTION used as variable names in an assignment.
6. The ‘arrow up’ key was pressed repeatedly enabling
The experiment primarily designed to teach the basics of
MATLAB. There are following tutorials which intends to get you up
to browse the command history browser.
and run the software. Several topics are discussed, but the treatment 7. More than one command may be entered on a single
for each topic is merely introductory. The discussion on MATLAB line in the command window if these are separated by
functions for example is limited to what is only necessary for a first commas.
encounter. 8. Comments may be added to a line by preceding the
The objective as stated above also necessitates that discussion comment with ‘%’.
for a certain topic be spread out on the whole material and not just 9. To look at the available operators, help ops was
concentrated in a single section. The intention is to bring out only typed at the command prompt. Alternately, helpwin
what is important as you read and implement the MATLAB in the command window can be entered and
commands discussed in the tutorial. If you want to know more on a matlab\ops in the Help Window that opened was
certain topic, please make use of MATLAB’s Help facility. clicked.
10. To see available set of built-in elementary math
functions, help elfun was typed.
II. METHODOLOGY
The students have undergone a step-by-step learning
process unto the basic commands, matrices, and plot functions. B. Matrices
A. Getting Started MATLAB started as a software designed for
manipulating matrices, hence the name, which comes
So as to get start in running MATLAB, some basic from “MATrix Laboratory”. Every variable in MATLAB
functions and syntaxes were introduced. is a matrix.
A. Getting Started
1. What information does the command whos give?
The command whos contained the variable’s
information such as name, size, bytes, class and its
attributes.
Fig. 4 Answer for the line “20-3^2*5+6/2”
The Command History browser contained Fig. 6 Cube root of 216 using the nthroot function
line of statements that were ran in the current and
previous sessions in MATLAB. Double Clicking a 8. What happens if you enter only a single argument in
line in the Command History selected previous using the function nthroot?
statements and rerun it. Command History window An error occurred when entering only a single
displays a log of statements that you ran in the current argument.
and previous MATLAB sessions.
4. The angle θ2 for the point (–3,–2) in the Cartesian
plane
5. e–2
Fig. 11 The value of inverse sin of 0.8 Fig. 16 Natural logarithm of 5 is 1.6094
Fig. 12 The angle for the point (3,2) in the Cartesian plane is 56.3099 degrees
2. Matrix multiplication is commutative
Fig. 17 The complex number’s magnitude and angle Fig.20 Commutative matrix multiplication
representation
3. If a matrix is square, it can be
multiplied to itself by using the
9. The real and imaginary components of 8∠150° ^ operator.
B. Matrix:
C. Plots
MATLAB plots are done using the function plot(x,y). Fig. 25 Sample plot a finer sine wave
1. Below are the commands use to plot a sine wave 3. To view a plot in another figure window and to have
>> x = 0:0.1:1 a red-colored curve
>> y = sin(2*pi*1*x)
>> plot(x,y) >> figure, plot(x,y,’r’)
IV. CONCLUSION
REFERENCES
[1] (2001). Enterprise Information Technology Services. Retrieved from
https://eits.uga.edu/hardware_and_software/software/mathworks_matla
b/
[2] MathWorks. (2019). MATLAB. Retrieved from
https://www.mathworks.com/products/matlab.html
[3] Rabuya, I. (2016, November 15). MATLAB FAMILIARIZATION.