% erp2ft
% -----------------
% Curso HEP Granada 2018
% Pandelis Perakakis, Luis Ciria
% peraka@ugr.es, lciria@ugr.es
% ------------------------------
function ftdata = erp2ft(erpdata, times, chanlocs, subdim, fsample)
%
for i = 1:size(erpdata,subdim)
    ftdata{i}.avg = erpdata(:,:,i)';
    ftdata{i}.fsample = fsample;
    ftdata{i}.label = chanlocs';
    ftdata{i}.dimord = 'chan_time';
    ftdata{i}.time = times;
end