4.0

4.0 | 2 ratings Rate this file 30 Downloads (last 30 days) File Size: 5.04 KB File ID: #31646
image thumbnail

ifilter: Interactive Fourier filter function, version 3

by Tom O'Haver

 

01 Jun 2011 (Updated 28 Oct 2011)

Keyboard-operated interactive Fourier filter function for time-series signals.

| Watch this File

File Information
Description

ifilter(x,y) or ifilter(y) or ifilter([x y]) or ry=ifilter(x,y,center,width,shape,plotmode,filtermode)
Keyboard-operated interactive Fourier filter function for time-series signal (x,y), with keyboard controls that allow you to adjust the filter parameters continuously while observing the effect on your signal dynamically. Optinal input arguments set the intital values of center frequency, filter width, shape, plotmode (1=linear; 2=semilog frequency; 3=semilog amplitude; 4=log-log) and filtermode ('Band-pass','Lowpass', 'Highpass', 'Bandpass', and 'Band-reject (notch)'). Returns the filtered signal. Press K to list keyboard commands.
T. C. O'Haver (toh@umd.edu), Version 3 adds X key to switch between frequency and period x scale on power spectrum plot.

 Example 1:
 x=0:100;y=sin(x);ifilter(x,y);

 Example 2 uses optional input arguments to set intital values:
 x=0:(1/8000):.3;
 y=(1+12/100.*sin(2*47*pi.*x)).*sin(880*pi.*x)+(1+12/100.*si(2*20*pi.*x)).*sin(2000*pi.*x);
 ry=ifilter(x,y,132,31,18,3,'Band-pass');

  KEYBOARD CONTROLS when figure window is topmost:
  Adjust center frequency.......Coarse: < and >
                    Fine: left and right cursor arrows
  Adjust filter width...........Coarse: / and "
                    Fine: up and down cursor arrows
  Filter shape..................A,Z (A more rectangular, Z more Gaussian)
  Filter mode...................B=bandpass; N or R=notch (band reject)
                    H=High-pass; L=Low-pass
  Select plot mode..............1=linear; 2=semilog frequency
                    3=semilog amplitude; 4=log-log
  Print keyboard commands.......K Pints this list
  Print filter parameters.......Q Prints input argumentsy: center,width,shape,plotmode,filtermode
  Print current settings........T Prints list of current settings
 Switch SPECTRUM X-axis scale..X switch between frequency and period x scale on POWER SPECTRA
  Switch OUTPUT Y-axis scale....Y switch between fixed or variable y scale on output plot
  Play output as sound..........P or Enter
  Save output as .mat file......S

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
26 Oct 2011 ehsan  
26 Oct 2011 ehsan  
Please login to add a comment or rating.
Updates
02 Jun 2011

Reformatted description

01 Oct 2011

 Version 2, October, 2011. Additions
include increased input argument flexibility; 'Y' key chages y-axis
$ scale on OUTPUT plot; 'T' key prints current settings.

28 Oct 2011

Version 3 adds X key to switch between frequency and period x scale on power spectrum plot.

Tag Activity for this File
Tag Applied By Date/Time
communications Tom O'Haver 02 Jun 2011 09:32:05
measurement Tom O'Haver 02 Jun 2011 09:32:05
signal processing Tom O'Haver 02 Jun 2011 09:32:05
signal processing ehsan 26 Oct 2011 03:57:58

Contact us at files@mathworks.com