Home > m > gui > ltpdv > callbacks > ltpdv_plotFilterResp.m

ltpdv_plotFilterResp

PURPOSE ^

LTPDV_PLOTFILTERRESP plots the response of the selected filter.

SYNOPSIS ^

function ltpdv_plotFilterResp(varargin)

DESCRIPTION ^

 LTPDV_PLOTFILTERRESP plots the response of the selected filter.
 
 M Hewitson 24-04-08
 
 $Id: ltpdv_plotFilterResp.m,v 1.1 2008/05/11 10:38:43 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ltpdv_plotFilterResp(varargin)
0002 % LTPDV_PLOTFILTERRESP plots the response of the selected filter.
0003 %
0004 % M Hewitson 24-04-08
0005 %
0006 % $Id: ltpdv_plotFilterResp.m,v 1.1 2008/05/11 10:38:43 hewitson Exp $
0007 %
0008 
0009 % Handles
0010 myh     = varargin{1};
0011 htab    = varargin{end-1};
0012 mainfig = varargin{end};
0013 
0014 % Get selected filter
0015 filts = getappdata(mainfig, 'Filters');
0016 % Get selection
0017 fh = findobj(mainfig, 'Tag', 'LTPDVfilterList');
0018 idx = get(fh, 'Value');
0019 sfilts = [];
0020 for j=1:length(filts)
0021    if ismember(j, idx)
0022       sfilts = [sfilts filts(j)];
0023    end
0024 end
0025 
0026 % get frequency plist
0027 pl = ltpdv_filter_getf(mainfig);
0028 
0029 % Get responses
0030 fr = [];
0031 for j=1:length(sfilts)
0032    filt = sfilts(j);
0033    disp(sprintf('   - filter %03d: %s', j, filt.name));
0034    r = resp(filt, pl);
0035    if isempty(fr)
0036       fr = r;
0037    else
0038       fr = fr.*r;
0039    end
0040 end
0041 
0042 % Plot filter response
0043 iplot(fr);
0044 
0045 % END

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003