all righty so in today's video I'm gonna
show you guys how to use MATLAB how to
set your path import your data and
reference your data as well as apply a
high-pass filter and how to change your
sample rate and also how to import your
events list extract your bin based epics
and apply are like channels locations so
first things first what we're gonna do
is we're gonna go in and log into
blackboard so let's do that now
[Music]
and then just log in and then once
you're logged in we're gonna go to our
class which is like 3:30 only for 33
spring 2018 section one and once you're
there going to go to contact and then
from there we're gonna like click on eg
toolbox and then go back as well as go
to some data and then also download
subject 41 as you can see it's
downloading right here and then as well
as go back and as well as our events
list B a so while that is downloading in
the background we are then going to open
our math lab which is going to be right
here math lab our 2008 teen a so what
math lab stands for it stands for matrix
laboratory if you guys didn't know and
then once that is opening up we can go
ahead and minimize this and then we're
gonna create a folder on our desktop as
you can see I already have mine created
but I'm just gonna create another one to
show you guys how to do it so just on
your desktop you're gonna right-click
and then you're gonna go to a new folder
so then this will pop up and then you
just name it
which it's best to name it as your class
psych waiting for 2018 and then you go
in there and then we're gonna go to our
downloads and as you can see it's all
right here and then we're just gonna
move it
[Music]
then go and then we can exit out and
then we're just gonna put that into our
new folder we created because we're
gonna be using these files later it's
like that simple as that
and now we can go back to our math lab
and what we're going to do first and the
first step we're always gonna do every
single time you open math lab no matter
what is we're gonna set our path and by
that how we do that we're gonna go to
this little button right here where it
says set path and the reason why we have
to go here and it's because we need to
give MATLAB the instructions or the
directions of like what we're gonna do
and then we you see us as odd folder and
then add what's subfolder and we are
going to do an ad with subfolder because
we're trying to get all of the files in
there so we're just going to go to our
desktop and then we're just going to
click on the file and then we're going
to add the EE glab into it and then
press open and then with that you can
see that all of the files are in there
and then we're just going to press close
and then press no and then right here as
you can see is our command window which
basically is like we're giving that lab
a command of what we want it to do
so what we're gonna type in this command
window is EEG lab all lowercase
and then you're just going to press in
turn
and then as you can see there's this
little blue screen which is also known
as a GUI which stands for graphic users
interface but we mainly just call it a
GUI so what we're gonna do from here is
we're gonna import our subject 41 that
we downloaded so we're going to go to
import data then we're gonna go using
EEG lab functions and plug-in and then
from there we're gonna go to from BIOS
semi PDF file because if you didn't
notice a file that we downloaded was a
BDF file so we're gonna click on that
and then we're just gonna go back to our
file where we have everything at and
then we're just gonna import that all
right so then now this another little
blue screen that pops up which just asks
us a few questions so asses us channel
list so basically what that is is just
asking us any specific channels that we
want to see but at the moment we want to
see them all so we're gonna leave that
blank and then data range we're gonna
leave that book blank as well because we
want everything and then right here says
a reference channels this is where we're
gonna reference we're gonna reference
channel 33 and 34 and those channels
are your mastoids which are behind your
ears and a little bit like above the
earlobes and their little bone in the
back those are your mastoids which would
the reason why we reference those is
because you want to reference something
more like a you want to reference a
brain site that's more neutral and
that's a perfect one to use and those
numbers are 33
thirty four and then after that we're
just gonna click okay
and then once that is done another
screen is gonna pop up asking us to save
it so now we're gonna save it as a PDF
file so right now we're just gonna name
it sub like subject 41 we're just come
to just put 41 and that's there and then
after that you can just press ok and
then as you can see we named it it's
going to be right here 41 and then also
we're our reference which is going to be
the left master it's in the right master
and then from here what we're gonna do
is going to apply a high-pass filter
which applying a high-pass filter of one
point Hertz which means everything above
or higher we let pass through and
everything below our lower we get rid of
we want to clean up our data so what
we're gonna do to apply that high-pass
filter we're going to go to eat our P
lab and then we're going to go to the
filters and frequency tools then we're
going to go to filter with EEG data and
then we're gonna have this a lovely
screen and with that since we're
applying a high-pass filter we are going
to click the high-pass and make sure
this is on as you can see it is clicked
and make sure the low-pass is off which
it is and then we're just going to press
apply and then with doing that we are
going to be asked to save our changes
as you can see we still have a 41 and
what's its best to save your every
change you do with the name of what you
did to it so right now we are subject 41
and then we're gonna put point 1 Hertz
because we apply to high-pass filter at
point 1 Hertz and then we also just want
to click this box and then we're gonna
copy this and then paste it because we
want to save it as a file I'm the reason
why we do that is just in case sometimes
the program crashes and are sometimes
things get go wrong or you lose your
data and it's best to have it saved
because you can just go right back to
this step instead of starting all over
again which is can be really frustrating
so this is really handy so you always
want to save all your changes and we're
just gonna press ok all right so then
now that our file is saved you can see
right here the change that we did now
that it's saved we are now going to
we're going to down sample our data so
what we're gonna do is we're gonna go to
tools then we're gonna go to change
sampling rate then as you can see it
says 1024 we're gonna delete that
because I never just way too big and we
kind of want to just like make it we
just want to downsize example a little
bit to make it easier so we're gonna use
256 and then you're just going to press
ok to apply it as you can see it's
working down here I'm gonna take like
like not that long like 30 seconds if
not I look perfect and then since we
down some sized it we are going to then
rename it we're gonna put an underscore
bring the name 256
Hertz and then do the same thing we're
gonna copy that click that box and paste
it there and then press ok and then as
you can see look it's just like what I
was saying we had a problem so that's ok
because we saved it so what we can do we
can just press don't send and we're just
gonna have to reopen MATLAB but now we
don't have to start all over we can just
go back to where we left off both the
thing one thing that we do always have
to do is set our path so we're just
going to do that real quick and then go
to add what subfolders and then go to
desktop and go to and then open it and
then since we're not gonna just import
our subject and start from the beginning
we're still gonna go to file but we're
gonna do load existing data set so we
just click on that and then we just go
to where we left off which is right here
and then we just click on it and then
we're back to where we where we left off
and since we're here now we're now gonna
we're going to import our events list
and the reason for the events list is
it's just so we can let the system like
let MATLAB know our possible outcomes of
what experiment we conducted so then
we're just gonna go to ERP lab then
we're going to go to event list and I'm
gonna create eat eat eg events list
simple right
all right so since we clicked on that
now we're gonna go to advanced because
we need to load it in so we want to go
to load right here loved list so we just
click on that and we're gonna go to our
desktop where our files are you know see
keeping everything in one folder makes
it a lot easier so we're just gonna
click on that we're gonna click on
events list and then we're going to go
to advanced events list right here and
then now that thought is in we're just
gonna press apply and while that's being
applied
we're just also going to press apply
again and then we're gonna save it but
as you can see I already put the eat
list so events list so we're just gonna
copy that and then paste it right there
for you and then after we're just gonna
save it
all right so now let's save right here
for us and then our next step we're
gonna do is we need to extract
urban-based epics so with that we're
gonna go to eat or peel up and then
we're gonna go to extract pin-based
epics and then we're gonna chant Waze
you can see mine is already set to
negative 200 201 5501 1500 but if yours
isn't you just can go in and just type
it in Y and make sure there's a space
between you always want that space so
it's negative 200 milliseconds to 1500
milliseconds and then we're just gonna
pass run and then while that's running
we gotta save it again and as you can
see I already put ve which is been based
epics and we just do what we've been
doing and then we're gonna press ok it
might crash again but if so it's fine
I'll see it did and it's fine because we
can just go back let's go back to where
we left off
all ready so now we're gonna go to set
path add what's up Boulder just do or
sending our path again and the more you
do it honestly it it becomes a lot
easier of course you know practice makes
perfect and there we go
alright and then we're just gonna load
that back in and we left off right here
Ben's based epics and there we are
voila and then as you can see our
reference is still there
we still haven't applied our channel
location as you can see so we're gonna
do that right now so we're gonna go and
we're gonna go to tools and we're gonna
do I'm sorry edit we're gonna go do
channel locations and then we're just
going to press ok
and then hit okay again the sleeve
everything how it is we don't mess with
that and then there it is we have our
channel location it says yes but as you
can see our reference is gone it's
unknown so that that sometimes will
happen if that does this make sure like
you look at it because if later on down
the line it's gonna even have problems
but it's simple all you have to do is
just go to your tools and where it says
re reference you're just gonna go to re
reference and then you're just gonna go
right here and you're just gonna put in
again no biggie
and then just put that and then press ok
and then you can save it again so just
copy and then paste and then voila
you're done Oh No see look now we have
another problem
see what I mean that would do it but
it's fine this is why we keep saving our
stuff and to be honest you just have to
have a lot of patience with this program
and just cuz like you never know
sometimes things just won't work are
literally the littlest thing little
mistake that you do can ruin everything
and I'll just mess up everything for you
but honestly this is where your patients
come in and that we're just gonna do all
this again real quick
there we go and then you just load see
it's simple
I'll be loading that back in and then
voila look at everything that our
channel locations are on our reference
are there our epics right here and then
the name of our file is here and there
you go the next step you can do is you
can start doing your ica and then
rejecting your artifacts and so forth
you can do so many much stuff yeah
alrighty