<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://fweb.wallawalla.edu/class-wiki/index.php?action=history&amp;feed=atom&amp;title=Alex_Haesche</id>
	<title>Alex Haesche - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://fweb.wallawalla.edu/class-wiki/index.php?action=history&amp;feed=atom&amp;title=Alex_Haesche"/>
	<link rel="alternate" type="text/html" href="https://fweb.wallawalla.edu/class-wiki/index.php?title=Alex_Haesche&amp;action=history"/>
	<updated>2026-04-06T12:59:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://fweb.wallawalla.edu/class-wiki/index.php?title=Alex_Haesche&amp;diff=10925&amp;oldid=prev</id>
		<title>Daniel.liwag: Created page with &quot;% Lowpass filter a discrete-time signal consisting of two sine waves.  % Use MATLAB to design a lowpass FIR filter with the Parks-Mclellan % (Remez) method.Specify the passband f…&quot;</title>
		<link rel="alternate" type="text/html" href="https://fweb.wallawalla.edu/class-wiki/index.php?title=Alex_Haesche&amp;diff=10925&amp;oldid=prev"/>
		<updated>2013-12-18T21:06:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;% Lowpass filter a discrete-time signal consisting of two sine waves.  % Use MATLAB to design a lowpass FIR filter with the Parks-Mclellan % (Remez) method.Specify the passband f…&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;% Lowpass filter a discrete-time signal consisting of two sine waves.&lt;br /&gt;
&lt;br /&gt;
% Use MATLAB to design a lowpass FIR filter with the Parks-Mclellan&lt;br /&gt;
% (Remez) method.Specify the passband frequency to be 0.15? radians/sample &lt;br /&gt;
% and the stopband frequency to be 0.25? radians/sample. Specify 1 dB of &lt;br /&gt;
% allowable passband ripple and a stopband attenuation of 60 dB.&lt;br /&gt;
&lt;br /&gt;
clc&lt;br /&gt;
clear all&lt;br /&gt;
close all&lt;br /&gt;
&lt;br /&gt;
% Query the valid design methods for your filter specification object, d.&lt;br /&gt;
d=fdesign.lowpass(&amp;#039;Fp,Fst,Ap,Ast&amp;#039;,0.15,0.25,1,60);&lt;br /&gt;
&lt;br /&gt;
% Ap — amount of ripple allowed in the pass band in decibels (the default&lt;br /&gt;
%       units).&lt;br /&gt;
% Ast — attenuation in the stop band in decibels (the default units).&lt;br /&gt;
% Fp — frequency at the start of the pass band. Specified in normalized&lt;br /&gt;
%       frequency units.&lt;br /&gt;
% Fst — frequency at the end of the stop band. Specified in normalized &lt;br /&gt;
%        frequency units.&lt;br /&gt;
&lt;br /&gt;
% Create an FIR equiripple filter and view the filter magnitude response &lt;br /&gt;
% with fvtool.&lt;br /&gt;
designmethods(d);&lt;br /&gt;
&lt;br /&gt;
% Create a signal consisting of the sum of two discrete-time sinusoids &lt;br /&gt;
% with frequencies of ?/8 and ?/4 radians/sample and amplitudes of &lt;br /&gt;
% 1 and 0.25 respectively. Filter the discrete-time signal with the FIR &lt;br /&gt;
% equiripple filter object, Hd.&lt;br /&gt;
Hd = design(d,&amp;#039;equiripple&amp;#039;);&lt;br /&gt;
fvtool(Hd);&lt;br /&gt;
&lt;br /&gt;
n = 0:159;&lt;br /&gt;
x = 0.25*cos((pi/8)*n)+sin((pi/4)*n);&lt;br /&gt;
y = filter(Hd,x);&lt;br /&gt;
Domega = (2*pi)/160;&lt;br /&gt;
freq = 0:(2*pi)/160:pi;&lt;br /&gt;
xdft = fft(x);&lt;br /&gt;
ydft = fft(y);&lt;br /&gt;
plot(freq,abs(xdft(1:length(x)/2+1)));&lt;br /&gt;
hold on;&lt;br /&gt;
plot(freq,abs(ydft(1:length(y)/2+1)),&amp;#039;r&amp;#039;,&amp;#039;linewidth&amp;#039;,2);&lt;br /&gt;
legend(&amp;#039;Original Signal&amp;#039;,&amp;#039;Highpass Signal&amp;#039;,&amp;#039;Location&amp;#039;,&amp;#039;NorthEast&amp;#039;);&lt;br /&gt;
ylabel(&amp;#039;Magnitude&amp;#039;); xlabel(&amp;#039;Radians/Sample&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% Create a filter of order 10 with a 6-dB frequency of 9.6 kHz and a &lt;br /&gt;
% sampling frequency of 48 kHz.&lt;br /&gt;
d=fdesign.lowpass(&amp;#039;N,Fc&amp;#039;,10,9600,48000);&lt;br /&gt;
designmethods(d);&lt;br /&gt;
&lt;br /&gt;
% % Display filter magnitude response&lt;br /&gt;
Hd = design(d);&lt;br /&gt;
% Zoom in on the magnitude response to verify that the -6 dB point is at&lt;br /&gt;
% 9.6 kHz.&lt;br /&gt;
fvtool(Hd);&lt;br /&gt;
&lt;br /&gt;
% References:&lt;br /&gt;
% http://eeweb.poly.edu/iselesni/EL713/remez/remez.pdf&lt;br /&gt;
% http://www.mathworks.com/help/signal/ref/fdesign.lowpass.html&lt;/div&gt;</summary>
		<author><name>Daniel.liwag</name></author>
	</entry>
</feed>