matlab
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', );
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
Hitachi provides a Matlab script (RealtimeOT.m) which can deliver real-time feedback from ETG-4000. This script is installed in the computer (Windows 2000) in the NIRS room. One can modify the script to deliver the real-time signal in the desired for
To synchronize NIRS recording and your stimuli (visual, auditory, button press etc), your presentation program needs to talk to the NIRS machine. Hitachi ETG4000 allows serial communication between the NIRS machine and an external computer. You can u
1. plotTraces, plot a time series, or multiple time series on one plot, with vertical lines indicating the markers (events). Can be used for data quality check and global signal detection. 2. plotTopoMap, plot a map of activation. 3. plot2, scatter p
Quite often you need to convert an image (or multiple images) to a MatLab matrix for further analysis and visualization (e.g. extracting time series, multivariate pattern analysis, etc). SPM provides handy functions for this: P = spm_select; % select
Wavelet transform coherence (WTC) is a method for analyzing the coherence and phase lag between two time series as a function of both time and frequency (Chang and Glover 2010). Here I played with it using the MatLab toolbox provided by Grinsted et a
Here are some parameters in matlab lighting. I first use patch command to plot the surface, then use camlight to shed some light on the surface.
SVM is mostly commonly used for binary classifications. But one branch of SVM, SVM regression or SVR, is able to fit a continuous function to data. This is particularly useful when the predicted variable is continuous. Here I tried some very simple c