12/27/2020 at 12:25 PM
#12152
andreashorn
Keymaster
I don’t think so – you’d need to use code and apply the same transform to all entries, a bit like this (rename the ea_reconstruction.mat file to ea_reconstruction_unmod.mat):
load ea_reconstruction_unmod
shift=[7,5,5]; % shift to introduce to electrode (could be negative, as well).
for side=1:2
reco.mni.markers(side).head=reco.mni.markers(side).head+shift;
reco.mni.markers(side).tail=reco.mni.markers(side).tail+shift;
reco.mni.markers(side).x=reco.mni.markers(side).x+shift;
reco.mni.markers(side).y=reco.mni.markers(side).y+shift;
reco.mni.coords_mm{side}=reco.mni.coords_mm{side}+repmat(shift,4,1);
reco.mni.trajectory{side}=reco.mni.trajectory{side}+repmat(shift,size(reco.mni.trajectory{side},1),1);
end
save(‘ea_reconstruction.mat’,’reco’);