


BML_APPLY applies a function to the data of each trial Use as raw = bml_apply(fun, data) data - FT_DATAYPE_RAW to which to apply the function fun fun - function to be applyed to the data returns a raw with modified trials.


0001 function raw = bml_apply(fun, data) 0002 0003 % BML_APPLY applies a function to the data of each trial 0004 % 0005 % Use as 0006 % raw = bml_apply(fun, data) 0007 % 0008 % data - FT_DATAYPE_RAW to which to apply the function fun 0009 % fun - function to be applyed to the data 0010 % 0011 % returns a raw with modified trials. 0012 0013 for i=1:numel(data.trial) 0014 data.trial{i} = fun(data.trial{i}); 0015 end 0016 raw=data;