-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathni2_example.m
68 lines (41 loc) · 1.38 KB
/
ni2_example.m
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[activity, time] = ni2_activation;
figure; plot(time, activity);
%%
[activity, time] = ni2_activation('frequency', 100);
figure; plot(time, activity);
%%
[activity, time] = ni2_activation('frequency', 5);
figure; plot(time, activity);
%%
headmodel = ni2_headmodel('type', 'singleshell');
figure; ft_plot_headmodel(headmodel, 'axes', true);
%%
headmodel = ni2_headmodel('type', 'spherical', 'nshell', 3);
figure; ft_plot_headmodel(headmodel, 'axes', true);
%%
headmodel = ni2_headmodel('type', 'spherical', 'nshell', 1);
figure; ft_plot_headmodel(headmodel, 'axes', true);
%%
sens = ni2_sensors('type', 'eeg');
figure; ft_plot_sens(sens, 'label', 'number')
%%
sens = ni2_sensors('type', 'ctf151');
figure; ft_plot_sens(sens, 'label', 'label', 'coil', false)
figure; ft_plot_sens(sens, 'label', 'label', 'coil', true)
%%
sens = ni2_sensors('type', 'meg');
figure; ft_plot_sens(sens, 'label', 'number', 'coil', true)
%%
leadfield = ni2_leadfield(sens, headmodel, [0 0 6 1 0 0]);
figure; ni2_topoplot(sens, leadfield)
%%
data = leadfield * activity;
figure; ni2_topomovie(sens, data, time)
%%
sourcemodel = ni2_sourcemodel('type', 'mesh');
figure; ft_plot_mesh(sourcemodel)
figure; ft_plot_mesh(sourcemodel.pos(sourcemodel.inside,:))
%%
sourcemodel = ni2_sourcemodel('type', 'grid', 'resolution', 1);
figure; ft_plot_mesh(sourcemodel)
figure; ft_plot_mesh(sourcemodel.pos(sourcemodel.inside,:))