00:00:03
if you have never used
00:00:05
matlab before this demo will get you
00:00:08
and show you where to go next to
00:00:10
get more information the matlab language
00:00:13
allows you to construct commands to
00:00:15
create and manipulate variables
00:00:17
variables can be created by typing
00:00:19
them into the command window for example
00:00:22
a equals one b equals two c
00:00:30
equals a + b or d equals cosine
00:00:38
and the basis of the matlab language is arrays
00:00:45
and variables can be vectors and
00:00:47
matrices or n-dimensional arrays you can
00:00:51
use square brackets to
00:00:52
construct arrays to create a
00:00:55
victor string you can write t equals
00:01:06
you can use the operator: to
00:01:10
simplify the creation of arrays with evenly
00:01:12
spaced elements p equals from
00:01:18
you can repeat a previously entered command
00:01:21
by pressing the up arrow commands you can
00:01:25
for example make it so that you change
00:01:28
from 0 to 1 in steps 001 semicolon at the
00:01:38
end of the command
00:01:40
suppresses the output of the results commands in the
00:01:42
command window to see what
00:01:47
variables have already been created, use the
00:01:49
hooves command or you can look at the
00:01:54
list of variables in the browser of the
00:01:57
matlab workspace to see
00:02:00
the value of the variable just write the name for
00:02:08
operations on vectors the same way as we do with simple scalars
00:02:11
for example y equals sine 2 multiplied by
00:02:20
this expression uses the constant pi
00:02:23
pride defined in matlab you can
00:02:26
plot a graph using the command plot
00:02:31
y from t in matlab the changes can be
00:02:43
to specify the imaginary part a symbol is used
00:02:45
and for example x is equal to 3 plus 4 and
00:02:54
matrices can be entered
00:02:56
using a semicolon in as
00:02:58
follows, a equals 1 2 3 4 5 6 7 8 10
00:03:11
or you can use functions
00:03:13
to see the list of matlab functions you can
00:03:16
click on the icon next to the command
00:03:19
and then find the desired function in one of the
00:03:23
such as mathematics random
00:03:28
number generation we will create a matrix
00:03:31
with random data double clicking on the
00:03:35
name of a function
00:03:37
puts it min on the command line after
00:03:45
writing the opening parenthesis a
00:03:46
tooltip appears showing the
00:03:49
possible input arguments of the function we will
00:03:52
hand over a matrix of 5 rows and 5 columns
00:03:59
you can access all of
00:04:02
matlab in the documentation by clicking on the question
00:04:04
mark on the toolbar in the
00:04:09
you can either you can navigate through the
00:04:12
information or search for the information you need, you can
00:04:33
introductory documentation by selecting the
00:04:36
getting started section in the matlab documentation, you can
00:04:44
find out the size of the matrix using the
00:04:46
says command, for example, the size of the matrix
00:04:53
and the size of all variables
00:04:55
is displayed in the workspace browser,
00:05:03
matrix operations, for example, b equals
00:05:06
a transposed or c equals a
00:05:13
multiplied by b which performs
00:05:18
matrix multiplication or c equals a .
00:05:23
multiply by b which does
00:05:26
element-by-element and multiplication when the
00:05:28
corresponding elements of the matrices are multiplied, you
00:05:30
can find the inverse matrix for a and
00:05:36
multiply it by the matrix a itself to
00:05:42
confirm that we get the identity
00:05:44
matrix, elements or sections of the array
00:05:51
can be selected using array indexing for the array,
00:05:55
but here is its value in the second row,
00:06:09
or for a variable, yes, this is a section that
00:06:16
rows from the first to the third and columns from
00:06:22
the second to the last, in the same way
00:06:27
you can assign values, for example,
00:06:31
for the variable data, you can set rows
00:06:38
1 to 2 y and all columns equal to zero
00:06:47
operator: used by itself by itself, when
00:06:51
indexing, denotes all elements of the
00:06:53
array, in this case, all columns,
00:06:57
please note that indexing
00:06:59
matlab arrays starting from one, you can
00:07:03
also use matrices when
00:07:05
plotting graphs, let you need to
00:07:08
display the matrix w defined as the
00:07:12
product of the transposed vector y by
00:07:19
where y is the sinusoid that we
00:07:21
defined above you can run the command
00:07:27
surf w which creates a surface graph
00:07:35
this concludes this demo you
00:07:38
can try some of these
00:07:39
examples could now or watch
00:07:42
one of the following videos