Skip to content

Commit

Permalink
Some changes in genvat_simbio.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreashorn committed Oct 31, 2015
1 parent d55fb6f commit 9c75fd0
Show file tree
Hide file tree
Showing 8 changed files with 4,227 additions and 127 deletions.
10 changes: 10 additions & 0 deletions dev/calc_gradient.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function gradient = ea_calc_gradient(vol,potential)
gradient = zeros(size(vol.hex,1),3);
gradient = gradient + 0.25*repmat(potential(vol.hex(:,1)),1,3).*((vol.pos(vol.hex(:,1),:)-vol.pos(vol.hex(:,7),:))./abs(vol.pos(vol.hex(:,1),:)-vol.pos(vol.hex(:,7),:)));
gradient = gradient + 0.25*repmat(potential(vol.hex(:,2)),1,3).*((vol.pos(vol.hex(:,2),:)-vol.pos(vol.hex(:,8),:))./abs(vol.pos(vol.hex(:,2),:)-vol.pos(vol.hex(:,8),:)));
gradient = gradient + 0.25*repmat(potential(vol.hex(:,3)),1,3).*((vol.pos(vol.hex(:,3),:)-vol.pos(vol.hex(:,5),:))./abs(vol.pos(vol.hex(:,3),:)-vol.pos(vol.hex(:,5),:)));
gradient = gradient + 0.25*repmat(potential(vol.hex(:,4)),1,3).*((vol.pos(vol.hex(:,4),:)-vol.pos(vol.hex(:,6),:))./abs(vol.pos(vol.hex(:,4),:)-vol.pos(vol.hex(:,6),:)));
gradient = gradient + 0.25*repmat(potential(vol.hex(:,5)),1,3).*((vol.pos(vol.hex(:,5),:)-vol.pos(vol.hex(:,3),:))./abs(vol.pos(vol.hex(:,5),:)-vol.pos(vol.hex(:,3),:)));
gradient = gradient + 0.25*repmat(potential(vol.hex(:,6)),1,3).*((vol.pos(vol.hex(:,6),:)-vol.pos(vol.hex(:,4),:))./abs(vol.pos(vol.hex(:,6),:)-vol.pos(vol.hex(:,4),:)));
gradient = gradient + 0.25*repmat(potential(vol.hex(:,7)),1,3).*((vol.pos(vol.hex(:,7),:)-vol.pos(vol.hex(:,1),:))./abs(vol.pos(vol.hex(:,7),:)-vol.pos(vol.hex(:,1),:)));
gradient = gradient + 0.25*repmat(potential(vol.hex(:,8)),1,3).*((vol.pos(vol.hex(:,8),:)-vol.pos(vol.hex(:,2),:))./abs(vol.pos(vol.hex(:,8),:)-vol.pos(vol.hex(:,2),:)));
2,213 changes: 2,148 additions & 65 deletions ea_genvat_simbio.m

Large diffs are not rendered by default.

839 changes: 834 additions & 5 deletions ea_showfibres_volume.m

Large diffs are not rendered by default.

Binary file modified ea_stimparams.fig
Binary file not shown.
466 changes: 410 additions & 56 deletions ea_stimparams.m

Large diffs are not rendered by default.

824 changes: 824 additions & 0 deletions ext_libs/arrow3ex.m

Large diffs are not rendered by default.

Binary file added icons/quiver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/electrode_models/ea_resolve_elspec.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
elspec.tip_color=0.3;
elspec.tip_length=1.5;
elspec.contact_spacing=0.5;
elspec.numel=4; % correct here since the directional leads will be inflated lateron.
elspec.numel=8; % correct here since the directional leads will be inflated lateron.
elspec.tipiscontact=1;
elspec.contactnames={'K0','K1','K2','K3','K8','K9','K10','K11'};
end
Expand Down

0 comments on commit 9c75fd0

Please sign in to comment.