필터 지우기
필터 지우기

Pairwise correlation between time-series

조회 수: 5 (최근 30일)
Tamir Eisenstein
Tamir Eisenstein 2020년 10월 4일
답변: Kiran Felix Robert 2020년 10월 8일
Hi MATLAB experts,
I have a 4D file of fMRI time-series data and a binarized file in the same dimensions covering several areas of the 4D file volume (a mask file).
How can I calculate the average correlation of all pairwise voxel by voxel time-series correlations inside the masked area in the 4D file?
Thanks!
Tamir

답변 (1개)

Kiran Felix Robert
Kiran Felix Robert 2020년 10월 8일
Hi Tamir,
I understand that you want to calculate the average correlation coefficients in each of the masked regions as specified by the mask file.
Since your mask is a binary file you can use the find function in the mask file to access the indices on the data file. Based on the indices you can assign each range of indices to a specific Matrix and perform the correlation by using the corrcoef function. Refer to this answer and this answer for more information of correlations on multi-dimensional matrices.
One example on using the find function is as shown below, assuming a 2-D mask and a 2-D image,
a = [0 0 0 0;0 0 1 1;0 0 1 1;0 0 0 0]; % Mask'
b = rand(4,4); % data
idx = find(a); % find mask locations
c = b(idx); % data points at the mask
Kiran Felix Robert

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by