 I've spoken to a few people recently who want to use statistical parametric mapping in their research, but they're worried about their lack of experience with coding or with MATLAB. So the purpose of this video is simply to demonstrate that the barrier to entry might be a lot lower than you think it is, and hopefully will perform a simple SPM analysis in just a few minutes and with just a few lines of code. Step one is to download the SPM code. So we're going to go to SPM1D.org. We'll go across to downloads, scroll down to the quick installation for MATLAB, click to download source code at the GitHub site, and then we can click download zip. When that's downloaded, we'll simply copy that to wherever we want to use the code. Once that's downloaded, I've simply moved it to my desktop and we're going to copy out all of the files that we might possibly need. So within this SPM8 folder, I'm just going to select all, copy, go back and paste those within the main folder. At this point, we need our data. So assuming that you're not familiar with MATLAB, I'm going to assume that you're managing your data somewhere else such as Excel, and we can simply copy and paste it into MATLAB ready to run the SPM. So in my example, I've got variable A and variable B, which are the two things I'm going to compare statistically. Each one, we have 101 data points, so ranging from 0% to 100% of a time series for each of 11 participants. In MATLAB now, I'm in the folder where I've copied all of the files I downloaded from SPM1D.org, and I'm just going to copy across my two variables. So no experience in MATLAB needed, just going to click new variable up at the top, and we're going to call this one variable A, and then going to go back across to Excel. I'm going to select all of the data, and I'm going to copy it across into MATLAB. So as easy as that, I've now got variable A. I'm going to this time add variable B back into Excel, get my 101 data points for each of 11 participants, and again, copy it across. So we've now got variable A and variable B ready to be statistically compared. For the first time now, we need to actually open a MATLAB script. So I'm just going to click new script, and I'm going to save that just as script SPM. Now that we've got our MATLAB script open, we're going to attempt to run an SPM paired samples t-test in just three lines of code. So first line SPM equals SPM1D.stats, and then this bit will vary depending on what test you want to run, but all of the examples can be found at SPM1D.org. But for us, we're going to run a t-test paired, and we want to compare variable A and variable B. And then the semicolon just prevents printing to screen. Second line of code, we want to run the actual SPM statistical inference. So SPMI equals SPM.inference. Our alpha level is 0.05. And we want it to be a two-tailed t-test. So we're going to put two-tailed true. We simply put false if we wanted one-tailed. And then final line, we want it to plot the SPM t-test results. So SPMI.plot will then click run at the top. And we have our results. So our plot here, the dashed red line shows the critical t value, beyond which we've reached significance. And we can see here that from around 40 to maybe 65% of this movement, there is a significant difference between our two variables. Whereas before that and after that, that isn't. In our output at the bottom of the screen, we can see the p-value for that range. So 0.0067. And there in just three lines of code and just a few minutes, you've got the statistical parametric mapping results. As I'm sure you can imagine, it can be a lot more complex than that. And it's important to understand what we're doing and why. But the purpose of this video was just to show that the barrier to entry is potentially a lot lower than you might have thought. And it might not take as long as you might think to get to grips with running an SPM test in MATLAB. Hopefully you found that useful. Credit must go to Todd Pataki for the SPM1D.org website and all of the code used within this MATLAB example. Thank you very much.