source: trunk/src/get_field/filter_band.m @ 264

Last change on this file since 264 was 170, checked in by sommeria, 14 years ago

cleaning of documentation

File size: 844 bytes
Line 
1% 'filter_band.m': plot a field after band filtering in the GUI get_field
2%  GUI_input=filter_band(hget_field)
3%
4% OUTPUT:
5% GUI_input: option for display in the GUI get_field
6%
7%INPUT:
8% hget_field: handles of the GUI get_field
9%
10function filter_band(Field,hget_field)
11
12if ~isempty(VarIndex.x)
13    VarName_x=Field.ListVarName{VarIndex.x};
14end
15
16prompt={'selected period (nbre of points)'};
17   def={'10'};
18   dlgTitle='primary period';
19   lineNo=1;
20   answer=inputdlg(prompt,dlgTitle,lineNo,def);
21period=round(str2num(answer{1}));
22filt_vector=ones(1,period)/period;% averaging vector
23VarName_y=Field.ListVarName(VarIndex.y);
24% hfig
25if isempty(str2num(hfig))
26    figure
27else
28figure(str2num(hfig))
29end
30for ivar=1:length(VarName_y)
31    eval(['Var= filter(filt_vector,1,Field.' VarName_y{ivar} ');']);
32
33    plot(Var)
34    grid on
35    hold on
36end
37
38 
Note: See TracBrowser for help on using the repository browser.