matlab

Distribution of correlation coefficient (r)

Assume you got correlation r=0.6 between two variables (N=10), is 0.6 significantly bigger than 0? Or if you observed r=0.98, is it significantly different from r=0.9? For these questions, we need to know the distribution of r of our sample, given th
Xu Cui
38 sec read

Using matlab to control LPT port

Download the following 4 files: porttalk.sys, copy to C:\WINDOWS\system32\drivers lptread.m lptread.mexw32 lptwrite.mexw32 Copy the last three files to a directory where your matlab can access. Your LPT port number is probably 0x378 (or 888). Assume
Xu Cui
28 sec read

batch script for NIRS-SPM

I wrote some batch scripts for NIRS-SPM. They, together with NIRS-SPM and xTopo, are called “super” package (I apparently run out of names). The “super” package are located in directory: /fs/quarry/cuixu/NIRS/super Please don&
Xu Cui
1 min read

Retinotopy analysis with MrVista

This protocol is based on Rory Sayres‘ teaching. Download and install MrVista svn checkout https://white.stanford.edu/repos/vistasoft If you already downloaded an older version, use svn update https://white.stanford.edu/repos/vi
Xu Cui
5 min read

Analyze NIRS data with NIRS-SPM

being updated for v01_r14 … NIRS-SPM is a SPM5 and MATLAB-based software package for statistical analysis of near-infrared spectroscopy (NIRS) signals, developed at the Bio Imaging Signal Processing (BISP) lab. at KAIST in Korea. prepare files
Xu Cui
4 min read

non-blocking pause

Assume you have a presentation and you want it to stay on the screen for 10 seconds, you may write code something like pause(10) or WaitSecs(10) It’s fine except you can do nothing within those 10s. What if you want to do something else during
Xu Cui
19 sec read

Stanford NIRS lab

Check out Near infrared spectroscopy (NIRS) Lab I take charge of: http://spnl.stanford.edu/tools/nirsCIBSR/nirsHome.htm NIRS allows you to measure neural activities on the surface of the brain. Some labs use NIRS to do brain-computer interface, i.e.
Xu Cui
11 sec read

Kolmogorov-Smirnov test

KS test is like T test; but it tests not only the mean but also the distribution. The null hypothesis for this test is that the two data sets are drawn from the same continuous distribution. In matlab, you can use function kstest2 to perform two-samp
Xu Cui
27 sec read

fMRI: how to do ROI analysis

ROI stands for region of interest. The region is predefined usually from glm contrast. For example, you find visual cortex is activated when a flash is presented through glm analysis, you may then do more analysis on this particular region. ROI analy
Xu Cui
42 sec read