source: trunk/src/transform_field/signal_filter.m @ 575

Last change on this file since 575 was 539, checked in by sommeria, 12 years ago

signal_filter added

File size: 865 bytes
Line 
1% 'FFT': calculate and display 2D spectrum of the input scalar
2%  GUI_input=FFT(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%
10
11function DataOut=signal_filter(DataIn)
12%% set GUI config
13DataOut=[];
14if strcmp(DataIn,'*')   
15    DataOut.InputFieldType='1D';
16    return
17end
18%%%%%%%%%%%%%%%%%%%%%%%%%
19frequency=2*5/54.5;
20frequency=frequency;
21 %d=fdesign.bandpass(0.8*frequency, 0.95*frequency, 1.05*frequency, 1.2*frequency, 60, 1, 60);
22 d=fdesign.bandpass(0.7*frequency, 0.9*frequency, 1.1*frequency, 1.3*frequency, 60, 1, 60);
23 Hd=design(d);% command  fvtool(Hd) to visualize the filter frequency response
24 DataOut=DataIn;
25 if isfield(DataIn,'U')
26 DataOut.U = filter(Hd,DataIn.U);
27 end
28  if isfield(DataIn,'V')
29 DataOut.V = filter(Hd,DataIn.V);
30 end
31
Note: See TracBrowser for help on using the repository browser.