## Wavelet Coherence

Wavelet transform coherence (WTC) is a method for analyzing the coherence and phase lag between two time series as a function of both time...
Xu Cui

## MatLab surface lighting

Here are some parameters in matlab lighting. I first use patch command to plot the surface, then use camlight to shed some light on...
Xu Cui

## SVM regression with libsvm

SVM is mostly commonly used for binary classifications. But one branch of SVM, SVM regression or SVR, is able to fit a continuous function...
Xu Cui

## Brain surface plot with MatLab

This is an example of brain activation plotted on surface. In many circumstances surface view is much more straightforward than a slice view. Here...
Xu Cui

## tcpip connection with pnet

We use TCP/UDP/IP Toolbox 2.0.5 to read and write data from/to a TCPIP port. It’s fast and reliable. The version we use is 2.0.5....
Xu Cui

## 3D Rotation

Assume you have a vector (x,y,z) and you want to rotate it to, say x-axis, you can multiply the rotation matrix to the vector....
Xu Cui

## Reference slice in slice timing in SPM

I saw at least two web pages saying that the reference slice can be chosen during slice timing correction. For example, http://www.fil.ion.ucl.ac.uk/spm/doc/manual/spatial.htm. I disagree....
Xu Cui

## Some formulas of linear regression

y: dependent variable X: independent variable r: residual $$y=X\beta+r$$ $$\beta=inv(X’*X)*X’*y$$ $$\sigma^2=r’*r/df$$ $$df=N-rank(X)$$ $$\sigma_\beta^2=\sigma^2inv(X’X)$$ $$T_\beta=\beta/\sigma_\beta$$ $$contrast variance = c’*\sigma_\beta^2*c$$ $$T_{contrast}=c’\beta/\sqrt{contrast variance}$$ $$r=\beta\frac{std(x)}{std(y)}$$ $$\beta=r\frac{std(y)}{std(x)}$$ var(y) =...
Xu Cui