Skip to content

change_sig_prop

change_sig_prop changes the color and/or the filters of channels in AnyWave.

anywave('change_sig_prop', cfg);
field content required
labels cell array of the labels of the channels to change yes
color color of the trace, '#RRGGBB' no
hp high pass filter in Hz no
lp low pass filter in Hz no
notch notch filter in Hz no

Give at least one of color, hp, lp, notch. The change applies to the channels of the current montage.

Examples

Change the color of channel A1:

function main(varargin)
anywave('init', varargin);

cfg = [];
cfg.labels = {'A1'};
cfg.color = '#008800';      % green
anywave('change_sig_prop', cfg);
end

Change the filters and the color of several channels at once:

cfg = [];
cfg.labels = {'A1', 'A4', 'A5'};
cfg.color = '#001199';
cfg.hp = 1;                 % 1 Hz high pass
cfg.lp = 80;                % 80 Hz low pass
anywave('change_sig_prop', cfg);

Add a 50 Hz notch:

cfg = [];
cfg.labels = {'A1', 'A4', 'A5'};
cfg.notch = 50;
anywave('change_sig_prop', cfg);

Effect on the following requests

The new filters are the filters of the channels in AnyWave. A following get_data therefore returns filtered data, and the hp, lp, notch fields of its channels tell which filters were applied:

cfg = [];
cfg.labels = {'Fp1', 'Cz'};
cfg.hp = 1;
cfg.lp = 40;
anywave('change_sig_prop', cfg);

out = anywave('get_data', struct('labels', {{'Fp1', 'Cz'}}));
disp([out.channels.hp; out.channels.lp]);       % 1 1; 40 40

Use cfg.raw_data = true in get_data when you need the unfiltered values, see get_data.

Errors

message cause
ERROR: labels key is not specified in struct/dict parameter. no labels field
ERROR: labels is empty. labels is an empty list
need a struct as second argument. no argument
bad arguments. Expected struct. the argument is not a struct