-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessElectrotonicData2.m
More file actions
60 lines (40 loc) · 3.33 KB
/
processElectrotonicData2.m
File metadata and controls
60 lines (40 loc) · 3.33 KB
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
function properties = processElectrotonicData2 (mn_struct, passiveParams, geometryType)
w = passiveParams.('w');
centrifugalAttenuation_mod_matrix = [];
centripetalAttenuation_mod_matrix = [];
centrifugalVoltageTransfer_mod_matrix = [];
centripetalVoltageTransfer_mod_matrix = [];
centripetalVoltageTransfer_phase_matrix = [];
transferImpedanceToSoma_mod_matrix = [];
transferImpedanceToSoma_phase_matrix = [];
inputImpedance_mod_matrix = [];
inputImpedance_phase_matrix = [];
transferImpedanceToSoma_mod_norm_matrix = [];
for i = 1:length(w)
display(sprintf('w = %f', w(i)));
[centrifugalAttenuation, centripetalAttenuation,...
centrifugalVoltageTransfer, centripetalVoltageTransfer,...
transferImpedanceToSoma, inputImpedance] = calculateElectrotonics (passiveParams, w(i), mn_struct, geometryType);
centrifugalAttenuation_mod_matrix = [centrifugalAttenuation_mod_matrix, abs(centrifugalAttenuation)];
centripetalAttenuation_mod_matrix = [centripetalAttenuation_mod_matrix, abs(centripetalAttenuation)];
centrifugalVoltageTransfer_mod_matrix = [centrifugalVoltageTransfer_mod_matrix, abs(centrifugalVoltageTransfer)];
centripetalVoltageTransfer_mod_matrix = [centripetalVoltageTransfer_mod_matrix, abs(centripetalVoltageTransfer)];
centripetalVoltageTransfer_phase_matrix = [centripetalVoltageTransfer_phase_matrix, angle(centripetalVoltageTransfer)];
transferImpedanceToSoma_mod_matrix = [transferImpedanceToSoma_mod_matrix, abs(transferImpedanceToSoma)];
transferImpedanceToSoma_mod_norm_matrix = [transferImpedanceToSoma_mod_norm_matrix, abs(transferImpedanceToSoma)];
transferImpedanceToSoma_phase_matrix = [transferImpedanceToSoma_phase_matrix, angle(transferImpedanceToSoma)];
inputImpedance_mod_matrix = [inputImpedance_mod_matrix, abs(inputImpedance)];
inputImpedance_phase_matrix = [inputImpedance_phase_matrix, angle(inputImpedance)];
end
properties = mn_struct;
properties.('data').('local').('centrifugalVoltageAttenuation_mod') = centrifugalAttenuation_mod_matrix;
properties.('data').('local').('centripetalVoltageAttenuation_mod') = centripetalAttenuation_mod_matrix;
properties.('data').('local').('centrifugalVoltageTransfer_mod') = centrifugalVoltageTransfer_mod_matrix;
properties.('data').('local').('centripetalVoltageTransfer_mod') = centripetalVoltageTransfer_mod_matrix;
properties.('data').('local').('centripetalVoltageTransfer_phase') = centripetalVoltageTransfer_phase_matrix;
properties.('data').('local').('transferImpedanceToSoma_mod') = transferImpedanceToSoma_mod_matrix;
properties.('data').('local').('transferImpedanceToSoma_mod_norm') = transferImpedanceToSoma_mod_matrix / inputImpedance_mod_matrix(1,1);
properties.('data').('local').('transferImpedanceToSoma_phase') = transferImpedanceToSoma_phase_matrix;
properties.('data').('local').('inputImpedance_mod') = inputImpedance_mod_matrix;
properties.('data').('local').('inputImpedance_phase') = inputImpedance_phase_matrix;
end