forked from canlab/Canlab_MKDA_MetaAnalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meta_analysis_matlab_basics.rtf
46 lines (45 loc) · 1.41 KB
/
meta_analysis_matlab_basics.rtf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{\rtf1\mac\ansicpg10000\cocoartf102
{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww10660\viewh12880\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
\f0\fs24 \cf0 densityUtility\
studyplotUtility\
\
\
pwd\
cd /Users/tor/Documents/Tor_Documents/Databases/Meta_Databases\
help read_database\
cd /Users/tor/Documents/Tor_Documents/CurrentExperiments/Ed_book_chapter/\
save Meta_Working\
\
strcmp(study,'Paradiso_1997') % use this to compare strings\
wh = find(strcmp(study,'Paradiso_1997'))\
study\{1\} % cells are accessed with \{\}\
study\{wh\} % cells are accessed with \{\}\
x\
x(1) % elements/vectors are accessed with ()\
x(wh) % elements/vectors are accessed with ()\
[x y z] % vectors can be concatenated with []\
a = [x y z]; % vectors can be concatenated with []\
a(wh,:) % access matrices with (rows,columns), : for 'all'\
\
a([3785 3786],:) % use [ ] to make a vector out of a list of numbers\
\
% call functions with ( )\
which('brain_avg152T1.img') % file on the path?\
\
pathtool % add all relevant directories with scripts to the path\
\
[dmt,clusters] = density([x y z],.001,15,'mytest.img');\
\
[u,OUT] = density_pdf(size([x y z],1),10,15,'null_test.img');\
% for a real one, at least 1000 iterations.\
\
whos % list of all variables in workspace\
\
find(a(:,2) < -200)\
study\{1155\}\
a(1155,:)\
\
}