matlab
How to label each data point in a MatLab plot, like the following figure? MatLab code: x = ; y = x + rand(1,10); figure('color','w'); plot(x,y,'o'); a = '; b = num2str(a); c = cellstr(b); dx = 0.1; dy = 0.1; text(x+dx, y+dy, c); It also w
It would be nice if we can predict the future. For example, give the following time series, can we predict the next point? Let’s use SVM regression, which is said to be powerful. We use the immediate past data point as the predictor. We train o
We have an interesting challenge in one of our projects. In our neuroimaging experiment, we need the participant to play a computer game while his brain is scanned (using a NIRS device ETG 4000 in this case). As you can imagine, we need to start the
The “Cross Wavelet and Wavelet Coherence Toolbox” download link by Grinsted et al (http://www.pol.ac.uk/home/research/waveletcoherence/) is dead. We will send you an active download link upon your request (an email with the download
Sometimes we need to work on the surface of a brain. Here I create a surface mask based on the standard avg152T1 image (MNI space) for you to download. Visualized in xjview, you can see the mask in the yellow curved lines. It’s actually a surfa
This is the 6th post of the series: Handy programs to visualize NIRS data When we do an experiment, we often repeat an event (or block) for a few times. For example, in a typical finger tapping task, we ask the participants to do a finger tapping for
In my previous blog (https://www.alivelearn.net/?p=1426) and in our paper titled “NIRS-based hyperscanning reveals increased interpersonal coherence in superior frontal cortex during cooperation” (full text pdf available ), we have shown
The default format of output in MatLab is like below: v = 1.0e+003 * 9.0579 1.2699 9.1338 6.3236 0.9754 What if you want the format to be v = 9057.9 1269.9 9133.8 6323.6 975.4 The answer is simple. Run the following command in MatLab: format shortg
The statistics toolbox in MatLab provides an easy way to do 1-way and 2-way anova. Below are some examples. The functions are called anova1 and anovan. 1 way anova is to test if the mean in each group is same; and 2-way anova is to test (1) if the me