<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dear Rajat,</div><div><br></div><div>this old function transforms EEG data contained in the Fieldtrip structure into an EEGLAB structure.</div><div>After you have done that, to transform a channel location file, simply type in</div><div><br></div><div>EEG.chanlocs = struct('labels', cfg.elec.label, 'X', mattocell(cfg.elec.pnt(1,:)), 'Y', mattocell(cfg.elec.pnt(2,:)),'Z', mattocell(cfg.elec.pnt(3,:)));</div><div>EEG.chanlocs = convertlocs(EEG.chanlocs, 'cart2all');</div><div><br></div><div>This code is untested. You might have to switch X, Y and Z to obtain the correct orientation for the electrode cap.</div><div>Best,</div><div><br></div><div>Arno</div><div><br></div></body></html>