forked from benjamin-zimmerman/PracticeGit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_channel_loc.m
More file actions
25 lines (18 loc) · 891 Bytes
/
Copy pathplot_channel_loc.m
File metadata and controls
25 lines (18 loc) · 891 Bytes
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
% plot_channel_loc.m
% B. Zimmerman - 4/1/2020
% Tool based on OCP plotting function to visualize specific channels for optical data. It
% takes a montage file and a scalp_dig_fid file.
function plot_channel_loc(mtg, scalp_dig, channel)
[src,det,montage, mchans,wvl] = read_mtg(mtg);
load(scalp_dig,'-mat');
source_label = src{channel};
detector_label = det{channel};
source_index = find(strcmp(source_label,label));
detector_index = find(strcmp(detector_label,label));
hold on
scatter3(dig_scalp(:,1),dig_scalp(:,2),dig_scalp(:,3),'b','filled','LineWidth',0.2)
scatter3(dig_scalp(source_index,1),dig_scalp(source_index,2), dig_scalp(source_index,3),'r','filled','LineWidth',0.2)
scatter3(dig_scalp(detector_index,1),dig_scalp(detector_index,2), dig_scalp(detector_index,3),'r','filled','LineWidth',0.2)
% Here is my first edit
% And here is mine - Mate
end