Home > functions > gui > preAnalysis > trial_extractor > vb_trial_extractor_show_channel_property.m

vb_trial_extractor_show_channel_property

PURPOSE ^

show channel property

SYNOPSIS ^

function [data] = vb_trial_extractor_show_channel_property(data)

DESCRIPTION ^

 show channel property
 [USAGE]
    [data] = vb_trial_extractor_show_channel_property(data);
 [IN]
    data : vb_trial_extractor object.
 [OUT]
    data : vb_trial_extractor object.

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [data] = vb_trial_extractor_show_channel_property(data)
0002 % show channel property
0003 % [USAGE]
0004 %    [data] = vb_trial_extractor_show_channel_property(data);
0005 % [IN]
0006 %    data : vb_trial_extractor object.
0007 % [OUT]
0008 %    data : vb_trial_extractor object.
0009 %
0010 % Copyright (C) 2011, ATR All Rights Reserved.
0011 % License : New BSD License(see VBMEG_LICENSE.txt)
0012 
0013 %
0014 % --- Previous check
0015 %
0016 if ~exist('data', 'var')
0017     error('data is a required parameter.');
0018 end
0019 
0020 %
0021 % --- Main Procedure
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

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005