Home > functions > device > filter_func > vb_fprint_filter_parm.m

vb_fprint_filter_parm

PURPOSE ^

SYNOPSIS ^

function vb_fprint_filter_parm(parm)

DESCRIPTION ^

 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    vb_fprint_filter_parm(parm)
0002 %
0003 % Copyright (C) 2011, ATR All Rights Reserved.
0004 % License : New BSD License(see VBMEG_LICENSE.txt)
0005 
0006 if  ~isempty(parm.bias_flg) 
0007     if parm.bias_flg > 5,
0008         fprintf('Bias correction by first %d sample\n',parm.bias_flg)
0009     elseif parm.bias_flg > 0
0010         fprintf('Bias correction mode = %d\n',parm.bias_flg)
0011     end
0012 end
0013 if ~isempty(parm.highpass),
0014     % Highpass cutoff frequency
0015     fcut = parm.highpass; 
0016     
0017     if isfield(parm,'highpass_online') 
0018         Norder = parm.highpass_online;
0019         
0020         if Norder == 1
0021             % Exponential online highpass filter
0022             fprintf('Online highpass filter %6.1f [Hz]\n',fcut)
0023         elseif Norder > 1
0024             fprintf('butter filtfilt highpass filter %6.1f [Hz]\n',fcut)
0025         elseif Norder < 0
0026             fprintf('Online butter highpass filter %6.1f [Hz]\n',fcut)
0027         end
0028     end
0029     if ~isfield(parm,'highpass_online') || parm.highpass_online==0
0030         fprintf('FIR Highpass filter %6.1f [Hz]\n',fcut)
0031     end
0032 end
0033 % Lowpass filter
0034 if ~isempty(parm.lowpass)
0035     fcut = parm.lowpass;
0036     
0037     if isfield(parm,'lowpass_online') 
0038         % Online Butterworth filter
0039         Norder = parm.lowpass_online; % filter order
0040         if Norder > 0
0041             fprintf('butter filtfilt lowpass filter %6.1f [Hz]\n',fcut)
0042         elseif Norder < 0
0043             fprintf('Online butter lowpass filter %6.1f [Hz]\n',fcut)
0044         end
0045     end
0046     if ~isfield(parm,'lowpass_online') || parm.lowpass_online==0
0047         % FIR Lowpass filter
0048         fprintf('FIR Lowpass filter %6.1f [Hz]\n', fcut)
0049     end
0050 end
0051 
0052 % Down sampling
0053 if isfield(parm,'fsamp') && ~isempty(parm.fsamp)
0054     fsnew = parm.fsamp;
0055     fprintf('Down sampling to %6.1f [Hz]\n',fsnew)
0056 end
0057 
0058 % Common reference
0059 if isfield(parm,'common_flg') && ~isempty(parm.common_flg) ...
0060     && parm.common_flg==1
0061     fprintf('Common reference\n')
0062 end

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