0001 function [data] = vb_trial_extractor_show_channel_property(data)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 if ~exist('data', 'var')
0017 error('data is a required parameter.');
0018 end
0019
0020
0021
0022
0023 H = data.H;
0024
0025 val = get(H.trigger_channel_listbox, 'Value');
0026
0027 load_spec = struct;
0028 load_spec.ChannelName = cell(0);
0029 if ~isempty(val)
0030 text = [];
0031 list = get(H.trigger_channel_listbox, 'String');
0032 for k=1:length(val)
0033 load_spec.ChannelName{k} = list{val(k)};
0034 end
0035 con_file = vb_continuous_file_get_filename(data.continuous_file);
0036 [ch_data, ch_info] = vb_load_meg_data(con_file, load_spec);
0037 for k=1:length(ch_info.Name)
0038 ix = strmatch(list{val(k)}, ch_info.Name, 'exact');
0039 if ~isempty(ix)
0040 max_val = max(ch_data(ix, :));
0041 min_val = min(ch_data(ix, :));
0042 text = [text, sprintf('Ch:%s\n Max = %f, Min = %f\n', ch_info.Name{ix}, max_val, min_val)];
0043 end
0044 end
0045 vb_text_area('Selected channel property', text);
0046 end