Xu Cui

 

   



566 Stories by Xu Cui

What is the probability that the sun will rise tomorrow?

Laplace introduced the sunrise problem in 18th century. With prior knowledge that the sun has risen N days in the past consecutively (not knowing the gravity rules etc), what is your confidence that the sun will rise tomorrow? Let p be the probabilit
1 1 min read

Handy programs to visualize NIRS data (5): plot2

Let’s say you have two correlated variables, x and y. You may have more then one data points with x=10 and y=5. But if you do a scatter plot all these data points of the same value will become a single dot. You may want to use circles with size
0 31 sec read

Handy programs to visualize NIRS data (4): wt

In case you need to visualize your time series in both time and frequency domain (or just frequency domain), you can use the wt (wavelet transform) function in the Cross Wavelet and Wavelet Coherence toolbox by Grinsted et al. I often find the color
0 33 sec read

Handy programs to visualize NIRS data (3): plotFFT

Sometimes you wish to know the spectrum of a time series. plotFFT is a handy function for this purpose. You instantly know the power of the signal at each frequency. Here is an example on how to use this function: figure; plotFFT(randn(1,1000)); Sour
0 11 sec read

Handy programs to visualize NIRS data (2): plotTopoMap

Often you need to view the spatial pattern of activation as in the example below. plotTopoMap allows you to do that. It probably only works for Hitachi devices where the spatial relationship between channels are known. In the above example, the activ
0 37 sec read

Handy programs to visualize NIRS data (1): plotTraces

You often need to plot the time series of NIRS signal from all channels with event indicators (See the example below). plotTraces can do that easily. In the above example, time series of all 24 channels are plotted. The number on the y-axis indicates
1 26 sec read

MatLab set environment path

Quite often you need to call external or system commands inside MatLab. If those external commands are not in path, you need to add them. Here is how: setenv('PATH', );
0 7 sec read

Converting DICOM files to Analyze file in batch mode

I use SPM’s dicom import function to convert DICOM files to Analyze files. But it’s quite inconvenient if I have 20 subjects. Below is a script to do this conversion automatically. You can call this function inside a loop. function dicom2
8 23 sec read

PKU Bio-Net Reunion 2011

The 3rd PKU Bio-Net Annual Conference will be held on July 16th 2011, at Columbia University, New York City. This is a reunion for alumni of PKU School of Life Sciences (former Department of Biology) and other PKU alumni working in life science-relat
0 10 sec read