Great. Thanks.
This seems to do the trick:
D = spm_eeg_load(filename)
neworder = {'Nasion', 'LPA', 'RPA'};
for n = 1:length(neworder)
ind = find(strcmp(D.fiducials.fid.label, neworder{n})
newfid.fid.label{n,1} = neworder{n}
newfid.fid.pnt(n,:) = D.fiducials.fid.pnt(ind,:)
end
D = fiducials(D,newfid)
D.save
Just to check: are the elements of D.fiducials.pnt independent of the D.fiducials.fid.label and D.fiducials.fid.pnt? And is there anything else I need to modify if I change D.fiducials.fid.label and D.fiducials.fid.pnt?
Ta.
|