Home > m > gui > ltpdv > callbacks > ltpdv_storeFilterResp.m

ltpdv_storeFilterResp

PURPOSE ^

LTPDV_STOREFILTERRESP stores the response on the current filter in the

SYNOPSIS ^

function ltpdv_storeFilterResp(varargin)

DESCRIPTION ^

 LTPDV_STOREFILTERRESP stores the response on the current filter in the
 object list.
 
 M Hewitson 24-04-08
 
 $Id: ltpdv_storeFilterResp.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_storeFilterResp(varargin)
0002 
0003 % LTPDV_STOREFILTERRESP stores the response on the current filter in the
0004 % object list.
0005 %
0006 % M Hewitson 24-04-08
0007 %
0008 % $Id: ltpdv_storeFilterResp.m,v 1.1 2008/05/11 10:38:43 hewitson Exp $
0009 %
0010 
0011 % Handles
0012 myh     = varargin{1};
0013 htab    = varargin{end-1};
0014 mainfig = varargin{end};
0015 
0016 % Get selected filter
0017 filts = getappdata(mainfig, 'Filters');
0018 % Get selection
0019 fh = findobj(mainfig, 'Tag', 'LTPDVfilterList');
0020 idx = get(fh, 'Value');
0021 sfilts = [];
0022 for j=1:length(filts)
0023    if ismember(j, idx)
0024       sfilts = [sfilts filts(j)];
0025    end
0026 end
0027 
0028 % get frequency plist
0029 pl = ltpdv_filter_getf(mainfig);
0030 
0031 % Get responses
0032 fr = [];
0033 for j=1:length(sfilts)
0034    filt = sfilts(j);
0035    disp(sprintf('   - filter %03d: %s', j, filt.name));
0036    r = resp(filt, pl);
0037    if isempty(fr)
0038       fr = r;
0039    else
0040       fr = fr.*r;
0041    end
0042 end
0043 
0044 % Add filter to the object list
0045 objs = getappdata(mainfig, 'LTPDAobjects');
0046 setappdata(mainfig, 'LTPDAobjects', [objs {fr}]);
0047 
0048 % Refresh object list
0049 ltpdv_refresh_object_list(mainfig);
0050 
0051 
0052 
0053 % END

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