Home > bml > signal > bml_apply.m

bml_apply

PURPOSE ^

BML_APPLY applies a function to the data of each trial

SYNOPSIS ^

function raw = bml_apply(fun, data)

DESCRIPTION ^

 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.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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;

Generated on Tue 25-Sep-2018 10:08:19 by m2html © 2005