This is a quick Matlab tutorial on how to make a matrix
and find the eigenvalues for it
so, when you open Matlab, you'll get this kind of interface
we're going to input our commands here
press enter, and then the output will come out right away
so, first, if we want to find eigenvalues, we need to make a matrix
so, first we'll make a matrix, we'll make a 2x2
so, we're going to do A, call it A, a 2x2, and lets say
we want to make it 1, 2, 3, 4
so we use these square brackets for the.. to denote a matrix
and we'll do 1, 2
that's the end of one row, so we put a semicolon, 3, and 4
press enter, and your matrix in the correct form will come out here
so you can check that its right
this is correct, so now we can find the eigenvalues directly using one command
so, 'eig' e-i-g
with the parameter in brackets, so our
matrix that we just made, A in brackets, press enter
and we get our eigenvalues right here, easy!
now lets do something a little bit more complex
now lets make A a 3x3 matrix
so, we want to do 1 through 9
we could input everything manually, or we could use a shortcut
so if I want to go to previous commands, we just wrote this here
I'm going to press up arrow, up arrow
and then I'm going to press right or left arrow
and we can directly edit this command
you can also use the mouse
so, we have this command now, lets edit it
we want to change it from a 2x2 to a 3x3
so the first row will be 1 to 3
and then 4, 5, 6
the end of the second row with a semicolon
7, 8, 9 and then press enter
and we get our lovely 3x3 matrix, we can check that everything's correct
now, we want to find the eigenvalues again
we just wrote this command
so we can again use up arrow, up arrow
and this time, we want to directly execute this command
so we just press enter
and, voilà!
we get our eigenvalues here
so this was a quick tutorial on how to get the eigenvalues of a matrix
you'll be using matlab a lot in this class so please become familiar with it ^^
