<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8577315283395211721</id><updated>2026-08-19T16:17:44.017+05:30</updated><category term="Signal Processing"/><category term="Digital Modulation Technique"/><category term="Analog Modulation Technique"/><title type='text'>NewLine code</title><subtitle type='html'>Make Every Step Count...&#xa;&#xa;Blog under the control of EPSILON LABS...www.epsilonlabs.in&#xa;&#xa;For immediate response/assistance mail to : epsilonlabs4@gmail.com</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>67</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-6191521673839935284</id><published>2013-10-07T01:22:00.000+05:30</published><updated>2013-10-07T01:23:46.533+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>FFT and IFFT Without Using Function (Matlab 2013a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program :&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;x = input(&#39;Enter the input sequence = &#39;);&lt;br /&gt;N = length(x);&lt;br /&gt;for k = 1:N&lt;br /&gt;y(k) = 0;&lt;br /&gt;for n = 1:N&lt;br /&gt;y(k) = y(k)+x(n)*exp(-1i*2*pi*(k-1)*(n-1)/N);&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;%code block to plot the input sequence&lt;br /&gt;t = 0:N-1;&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;stem(t,x);&lt;br /&gt;ylabel(&#39;Amplitude ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;n ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;Input Sequence&#39;);&lt;br /&gt;grid on;&lt;br /&gt;magnitude = abs(y); % Find the magnitudes of individual FFT points&lt;br /&gt;disp(&#39;FFT Sequence = &#39;);&lt;br /&gt;disp(magnitude);&lt;br /&gt;%code block to plot the FFT sequence&lt;br /&gt;t = 0:N-1;&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;stem(t,magnitude);&lt;br /&gt;ylabel(&#39;Amplitude ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;K ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;FFT Sequence&#39;);&lt;br /&gt;grid on;&lt;br /&gt;R = length(y);&lt;br /&gt;for n = 1:R&lt;br /&gt;x1(n) = 0;&lt;br /&gt;for k = 1:R&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x1(n) = x1(n)+(1/R)*y(k)*exp(1i*2*pi*(k-1)*(n-1)/R);&lt;br /&gt;end&lt;br /&gt;end&lt;br /&gt;%code block to plot the IFFT sequence&lt;br /&gt;t = 0:R-1;&lt;br /&gt;subplot(2,2,3);&lt;br /&gt;stem(t,x1);&lt;br /&gt;disp(&#39;IFFT Sequence = &#39;);&lt;br /&gt;disp(x1);&lt;br /&gt;ylabel(&#39;Amplitude ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;n ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;IFFT sequence&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output :&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the input sequence = [1 4 2 5 2]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;FFT Sequence = &lt;br /&gt;&amp;nbsp;&amp;nbsp; 14.0000&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.8124&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.3692&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.3692&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.8124&lt;br /&gt;&lt;br /&gt;IFFT Sequence = &lt;br /&gt;&amp;nbsp; Columns 1 through 4&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; 1.0000 - 0.0000i&amp;nbsp;&amp;nbsp; 4.0000 - 0.0000i&amp;nbsp;&amp;nbsp; 2.0000 - 0.0000i&amp;nbsp;&amp;nbsp; 5.0000 + 0.0000i&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Column 5&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; 2.0000 + 0.0000i&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveforms:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibr_dYmAQU7F8Rbv-G-a735731i9BZ4E23mGnLvDTkYhQ2UgrDRpoc7ekeJOhBMQrNftJsAQU24JhHwnueGOSBqhhI8HqBetWg8l-reyR7e2AyxuIb1IVgqHofJo2sZy2NmKurhghYFYs/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibr_dYmAQU7F8Rbv-G-a735731i9BZ4E23mGnLvDTkYhQ2UgrDRpoc7ekeJOhBMQrNftJsAQU24JhHwnueGOSBqhhI8HqBetWg8l-reyR7e2AyxuIb1IVgqHofJo2sZy2NmKurhghYFYs/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;span name=&quot;KavHltTag&quot;&gt;&amp;nbsp;&lt;img src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAYAAAGHNqTJAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACr0lEQVR4nH1TS0xTQRQ9M320r7U/CoGilCCIWB4KXcjChV24wS1xRcLSpS6MJsQVK0ggoC7c6Mboho3iJ6CJG6KJ0RWihj/StCnFSin2S9v33jjv9QME8SSTO3Pn3M/ce4eA4/6MxBhBPxl9Ic3KedUvGAnI0BCos0dShPa+80o6wUA07suVyyy0sYtkvACThYBqyt2dMByuFBpbc8jvlZjc6w4X1dqejr+WIpmEWq0ZeFqtoCebqVu7qTKqyOcyoIEl9apmb3VkUciliz40PPvUy1wNBAU1WVbBQESsLkQgjE5J3V0XOuf+5FYx/yULo4lwdwzuJiOszgxUuZTNw/de5qhhCK4QWKyAxc6wvUnQdJYh/JPuhxue9D6ta0wPGAysEk5VCX6FTuxUSA9mOm8zsDEcRkwnTLyRRvw9/YOh1NtDt3XiJZB7U91OX5c/Hit8xvJcAu0+uy4pJWjrskEwmoVYdO9jxWrla0KXLZ0iFKUAwe4iVJELFQLjeTpqKNKJPEStI5vB1GONUCZpT0zuqogEFF2nJzn6/JzibspT/AO6MvN9qSoaFlD2VF6xLcN+sTRoc+K4KD2pqzk94Gvrg0mw/cupjoKSxWLwHQLh+f1iTkxLvWKVddonXaFbmQ9gUI91UIaBmLC+GC1mMv7K+6jZI10X7Rlk5WipbGld2qoFiGaK35t5/Uy4xakWERabQT8HljMQxqak2TMtXn+OriO1dzR6Mi7zVdzXNhh4uTVjldejyGVc8EqRm2sbC3NuDyghR3wUs3Hy6nLb7YiCeFSBUQTqPUWyyp3QO9d+fKOKsSa0hq1sSsbBPprMjP8wGc5amT9J4c1mfCKALH9pmadlcij28GTHiMmsDLrqczguq4PQRz0o4ghVa7OxveMWH/u7KH3r/yDGGLvxF30tKs+p7Df9AAAAAElFTkSuQmCC&quot; width:12px=&quot;&quot; /&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/6191521673839935284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/10/fft-and-ifft-without-using-function.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/6191521673839935284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/6191521673839935284'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/10/fft-and-ifft-without-using-function.html' title='FFT and IFFT Without Using Function (Matlab 2013a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibr_dYmAQU7F8Rbv-G-a735731i9BZ4E23mGnLvDTkYhQ2UgrDRpoc7ekeJOhBMQrNftJsAQU24JhHwnueGOSBqhhI8HqBetWg8l-reyR7e2AyxuIb1IVgqHofJo2sZy2NmKurhghYFYs/s72-c/untitled.jpg" height="72" width="72"/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-2143230078702685518</id><published>2013-10-06T23:03:00.000+05:30</published><updated>2013-10-06T23:04:25.690+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>DCT and IDCT Without Using Function (Matlab 2013a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc&lt;br /&gt;clear all&lt;br /&gt;x = input(&#39;Enter the sequence = &#39;);&lt;br /&gt;l = length(x);&lt;br /&gt;for k = 1:l&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; y(k) = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (k==1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w(k) = 1/sqrt(l);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w(k) = sqrt(2/l);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for n = 1:l&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y(k) = y(k)+x(n)*cos(pi*(2*n-1)*(k-1)/(2*l));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; y(k) = y(k)*w(k);&lt;br /&gt;end&lt;br /&gt;t = 0:l-1;&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;stem(t,x);&lt;br /&gt;ylabel(&#39;Amplitude ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;n ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;Input Sequence&#39;);&lt;br /&gt;grid on;&lt;br /&gt;magnitude = abs(y); % Find the magnitudes of individual DCT points&lt;br /&gt;disp(&#39;DCT Sequence = &#39;);&lt;br /&gt;disp(magnitude);&lt;br /&gt;%code block to plot the DCT sequence&lt;br /&gt;t = 0:l-1;&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;stem(t,magnitude);&lt;br /&gt;ylabel(&#39;Amplitude ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;K ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;DCT Sequence&#39;);&lt;br /&gt;grid on;&lt;br /&gt;phase = angle(y); % Find the phases of individual DCT points&lt;br /&gt;disp(&#39;Phase = &#39;);&lt;br /&gt;disp(phase);&lt;br /&gt;%code block to plot the phase response&lt;br /&gt;t = 0:l-1;&lt;br /&gt;subplot(2,2,3);&lt;br /&gt;stem(t,phase);&lt;br /&gt;ylabel(&#39;Phase ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;K ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;grid on;&lt;br /&gt;for n = 1:l&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X(n) = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (n==1)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w(n) = 1/sqrt(l);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w(n) = sqrt(2/l);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for k = 1:l&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X(n) = X(n)+w(k)*y(k)*cos(pi*(2*n-1)*(k-1)/(2*l));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br /&gt;end&lt;br /&gt;t = 0:l-1;&lt;br /&gt;subplot(2,2,4);&lt;br /&gt;stem(t,X);&lt;br /&gt;disp(&#39;IDCT Sequence = &#39;);&lt;br /&gt;disp(X);&lt;br /&gt;ylabel(&#39;Amplitude ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;n ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;IDCT sequence&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the sequence = [2 4 3 1 2]&lt;br /&gt;DCT Sequence = &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.3666&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.1152&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.8279&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.8045&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.1208&lt;br /&gt;&lt;br /&gt;Phase = &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.1416&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.1416&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;br /&gt;&lt;br /&gt;IDCT Sequence = &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.0000&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.0000&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.0000&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.0000&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.0000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveforms:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7rc7bykpEhtCbL4maSgn3_yXMdw1wbFu909O_vui2y9zLtBh9Ajj_qR12wOL32zGzuirZlnWs30BYm65LeuCIcNS4C1NY5egWtgx_wLZLLeYYNBq0Vz52zzKuM6pKPlYY-KE8hbQJHR0/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7rc7bykpEhtCbL4maSgn3_yXMdw1wbFu909O_vui2y9zLtBh9Ajj_qR12wOL32zGzuirZlnWs30BYm65LeuCIcNS4C1NY5egWtgx_wLZLLeYYNBq0Vz52zzKuM6pKPlYY-KE8hbQJHR0/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;span name=&quot;KavHltTag&quot;&gt;&amp;nbsp;&lt;img src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAYAAAGHNqTJAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACr0lEQVR4nH1TS0xTQRQ9M320r7U/CoGilCCIWB4KXcjChV24wS1xRcLSpS6MJsQVK0ggoC7c6Mboho3iJ6CJG6KJ0RWihj/StCnFSin2S9v33jjv9QME8SSTO3Pn3M/ce4eA4/6MxBhBPxl9Ic3KedUvGAnI0BCos0dShPa+80o6wUA07suVyyy0sYtkvACThYBqyt2dMByuFBpbc8jvlZjc6w4X1dqejr+WIpmEWq0ZeFqtoCebqVu7qTKqyOcyoIEl9apmb3VkUciliz40PPvUy1wNBAU1WVbBQESsLkQgjE5J3V0XOuf+5FYx/yULo4lwdwzuJiOszgxUuZTNw/de5qhhCK4QWKyAxc6wvUnQdJYh/JPuhxue9D6ta0wPGAysEk5VCX6FTuxUSA9mOm8zsDEcRkwnTLyRRvw9/YOh1NtDt3XiJZB7U91OX5c/Hit8xvJcAu0+uy4pJWjrskEwmoVYdO9jxWrla0KXLZ0iFKUAwe4iVJELFQLjeTpqKNKJPEStI5vB1GONUCZpT0zuqogEFF2nJzn6/JzibspT/AO6MvN9qSoaFlD2VF6xLcN+sTRoc+K4KD2pqzk94Gvrg0mw/cupjoKSxWLwHQLh+f1iTkxLvWKVddonXaFbmQ9gUI91UIaBmLC+GC1mMv7K+6jZI10X7Rlk5WipbGld2qoFiGaK35t5/Uy4xakWERabQT8HljMQxqak2TMtXn+OriO1dzR6Mi7zVdzXNhh4uTVjldejyGVc8EqRm2sbC3NuDyghR3wUs3Hy6nLb7YiCeFSBUQTqPUWyyp3QO9d+fKOKsSa0hq1sSsbBPprMjP8wGc5amT9J4c1mfCKALH9pmadlcij28GTHiMmsDLrqczguq4PQRz0o4ghVa7OxveMWH/u7KH3r/yDGGLvxF30tKs+p7Df9AAAAAElFTkSuQmCC&quot; width:12px=&quot;&quot; /&gt;&amp;nbsp;&lt;/span&gt;&lt;span name=&quot;KavHltTag&quot;&gt;&amp;nbsp;&lt;img src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAYAAAGHNqTJAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACr0lEQVR4nH1TS0xTQRQ9M320r7U/CoGilCCIWB4KXcjChV24wS1xRcLSpS6MJsQVK0ggoC7c6Mboho3iJ6CJG6KJ0RWihj/StCnFSin2S9v33jjv9QME8SSTO3Pn3M/ce4eA4/6MxBhBPxl9Ic3KedUvGAnI0BCos0dShPa+80o6wUA07suVyyy0sYtkvACThYBqyt2dMByuFBpbc8jvlZjc6w4X1dqejr+WIpmEWq0ZeFqtoCebqVu7qTKqyOcyoIEl9apmb3VkUciliz40PPvUy1wNBAU1WVbBQESsLkQgjE5J3V0XOuf+5FYx/yULo4lwdwzuJiOszgxUuZTNw/de5qhhCK4QWKyAxc6wvUnQdJYh/JPuhxue9D6ta0wPGAysEk5VCX6FTuxUSA9mOm8zsDEcRkwnTLyRRvw9/YOh1NtDt3XiJZB7U91OX5c/Hit8xvJcAu0+uy4pJWjrskEwmoVYdO9jxWrla0KXLZ0iFKUAwe4iVJELFQLjeTpqKNKJPEStI5vB1GONUCZpT0zuqogEFF2nJzn6/JzibspT/AO6MvN9qSoaFlD2VF6xLcN+sTRoc+K4KD2pqzk94Gvrg0mw/cupjoKSxWLwHQLh+f1iTkxLvWKVddonXaFbmQ9gUI91UIaBmLC+GC1mMv7K+6jZI10X7Rlk5WipbGld2qoFiGaK35t5/Uy4xakWERabQT8HljMQxqak2TMtXn+OriO1dzR6Mi7zVdzXNhh4uTVjldejyGVc8EqRm2sbC3NuDyghR3wUs3Hy6nLb7YiCeFSBUQTqPUWyyp3QO9d+fKOKsSa0hq1sSsbBPprMjP8wGc5amT9J4c1mfCKALH9pmadlcij28GTHiMmsDLrqczguq4PQRz0o4ghVa7OxveMWH/u7KH3r/yDGGLvxF30tKs+p7Df9AAAAAElFTkSuQmCC&quot; width:12px=&quot;&quot; /&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/2143230078702685518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/10/dct-and-idct-without-using-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/2143230078702685518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/2143230078702685518'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/10/dct-and-idct-without-using-function.html' title='DCT and IDCT Without Using Function (Matlab 2013a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7rc7bykpEhtCbL4maSgn3_yXMdw1wbFu909O_vui2y9zLtBh9Ajj_qR12wOL32zGzuirZlnWs30BYm65LeuCIcNS4C1NY5egWtgx_wLZLLeYYNBq0Vz52zzKuM6pKPlYY-KE8hbQJHR0/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-2982804879904150510</id><published>2013-09-30T13:32:00.001+05:30</published><updated>2013-09-30T13:32:54.304+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Time &amp; Frequency Response of an LTI System (Matlab 2013a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Program:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;b = [1,-1];&lt;br /&gt;a = [0.9,-2,1];&lt;br /&gt;[h,w] = freqz(a,b);&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;mag = db(abs(h));&lt;br /&gt;plot(w,mag);&lt;br /&gt;xlabel(&#39;Normalized Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Magnitude in dB ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;h2 = (angle(h)*180/pi);&lt;br /&gt;plot(w,h2);&lt;br /&gt;xlabel(&#39;Normalized Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in degrees ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;x = [1,2,3,4,5];&lt;br /&gt;y = [3,8,11];&lt;br /&gt;z = conv(x,y);&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;stem(z);&lt;br /&gt;xlabel(&#39;n ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;x(n) ----&amp;gt;&#39;);&lt;br /&gt;title(&#39;Time Response&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Waveform:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmuKaQh4Svsb7xq5sDLMW53W69fVhWRv3n2PVSr2PDTO80N3VHtn1ypkk4WKrylSdU_RJHnCtgb9mmjIdHJaT3HwludvGSWAIdca9NcymdfmLCgnMl6rQbdd6rPSkiJe8UBYlQ1prus8w/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmuKaQh4Svsb7xq5sDLMW53W69fVhWRv3n2PVSr2PDTO80N3VHtn1ypkk4WKrylSdU_RJHnCtgb9mmjIdHJaT3HwludvGSWAIdca9NcymdfmLCgnMl6rQbdd6rPSkiJe8UBYlQ1prus8w/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;span name=&quot;KavHltTag&quot;&gt;&amp;nbsp;&lt;img src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAYAAAGHNqTJAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACr0lEQVR4nH1TS0xTQRQ9M320r7U/CoGilCCIWB4KXcjChV24wS1xRcLSpS6MJsQVK0ggoC7c6Mboho3iJ6CJG6KJ0RWihj/StCnFSin2S9v33jjv9QME8SSTO3Pn3M/ce4eA4/6MxBhBPxl9Ic3KedUvGAnI0BCos0dShPa+80o6wUA07suVyyy0sYtkvACThYBqyt2dMByuFBpbc8jvlZjc6w4X1dqejr+WIpmEWq0ZeFqtoCebqVu7qTKqyOcyoIEl9apmb3VkUciliz40PPvUy1wNBAU1WVbBQESsLkQgjE5J3V0XOuf+5FYx/yULo4lwdwzuJiOszgxUuZTNw/de5qhhCK4QWKyAxc6wvUnQdJYh/JPuhxue9D6ta0wPGAysEk5VCX6FTuxUSA9mOm8zsDEcRkwnTLyRRvw9/YOh1NtDt3XiJZB7U91OX5c/Hit8xvJcAu0+uy4pJWjrskEwmoVYdO9jxWrla0KXLZ0iFKUAwe4iVJELFQLjeTpqKNKJPEStI5vB1GONUCZpT0zuqogEFF2nJzn6/JzibspT/AO6MvN9qSoaFlD2VF6xLcN+sTRoc+K4KD2pqzk94Gvrg0mw/cupjoKSxWLwHQLh+f1iTkxLvWKVddonXaFbmQ9gUI91UIaBmLC+GC1mMv7K+6jZI10X7Rlk5WipbGld2qoFiGaK35t5/Uy4xakWERabQT8HljMQxqak2TMtXn+OriO1dzR6Mi7zVdzXNhh4uTVjldejyGVc8EqRm2sbC3NuDyghR3wUs3Hy6nLb7YiCeFSBUQTqPUWyyp3QO9d+fKOKsSa0hq1sSsbBPprMjP8wGc5amT9J4c1mfCKALH9pmadlcij28GTHiMmsDLrqczguq4PQRz0o4ghVa7OxveMWH/u7KH3r/yDGGLvxF30tKs+p7Df9AAAAAElFTkSuQmCC&quot; width:12px=&quot;&quot; /&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/2982804879904150510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/09/time-frequency-response-of-lti-system.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/2982804879904150510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/2982804879904150510'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/09/time-frequency-response-of-lti-system.html' title='Time &amp; Frequency Response of an LTI System (Matlab 2013a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmuKaQh4Svsb7xq5sDLMW53W69fVhWRv3n2PVSr2PDTO80N3VHtn1ypkk4WKrylSdU_RJHnCtgb9mmjIdHJaT3HwludvGSWAIdca9NcymdfmLCgnMl6rQbdd6rPSkiJe8UBYlQ1prus8w/s72-c/untitled.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-6231628342030238254</id><published>2013-04-27T10:35:00.001+05:30</published><updated>2013-04-27T10:35:34.518+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Digital Modulation Technique"/><title type='text'>Pulse Amplitude Modulation (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;a = input(&#39;Enter the amplitude = &#39;);&lt;br /&gt;f = input(&#39;Enter the frequency = &#39;);&lt;br /&gt;n = input(&#39;Enter the N value = &#39;);&lt;br /&gt;t = 0:0.1:n;&lt;br /&gt;x1 = stem(-t/3);&lt;br /&gt;x2 = sin(2*pi*f*t);&lt;br /&gt;y = x1.*x2;&lt;br /&gt;subplot(3,1,1);&lt;br /&gt;stem(x1);&lt;br /&gt;title(&#39;Impulse Signal&#39;);&lt;br /&gt;ylabel(&#39;Amplitude ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;n ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(3,1,2)&lt;br /&gt;plot(t,x2);&lt;br /&gt;title(&#39;Sine Wave&#39;);&lt;br /&gt;xlabel(&#39;Time -----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Amplitude -----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(3,1,3)&lt;br /&gt;stem(t,y);&lt;br /&gt;title(&#39;Pulse Modulated Wave&#39;);&lt;br /&gt;xlabel(&#39;Time -----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Amplitude -----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the amplitude = 5&lt;br /&gt;Enter the frequency = 1&lt;br /&gt;Enter the N value = 2&lt;b&gt;&amp;nbsp;&lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_8frqWuP1PdRZmuxrjiepK8ihYyv6yayxykoM43T1luNoV4gnu1DXE3A9ZrQKfhirwQFxgj_ua9udOyOQJTB9L8TNPOFuhz88DOjkysn5outSA14eAZl_5LYu1VaN8TdhkinvfLkl5o0/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_8frqWuP1PdRZmuxrjiepK8ihYyv6yayxykoM43T1luNoV4gnu1DXE3A9ZrQKfhirwQFxgj_ua9udOyOQJTB9L8TNPOFuhz88DOjkysn5outSA14eAZl_5LYu1VaN8TdhkinvfLkl5o0/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/6231628342030238254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/pulse-amplitude-modulation-matlab-2012a_27.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/6231628342030238254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/6231628342030238254'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/pulse-amplitude-modulation-matlab-2012a_27.html' title='Pulse Amplitude Modulation (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_8frqWuP1PdRZmuxrjiepK8ihYyv6yayxykoM43T1luNoV4gnu1DXE3A9ZrQKfhirwQFxgj_ua9udOyOQJTB9L8TNPOFuhz88DOjkysn5outSA14eAZl_5LYu1VaN8TdhkinvfLkl5o0/s72-c/untitled.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-5740632285512469509</id><published>2013-04-26T18:25:00.003+05:30</published><updated>2013-04-26T18:25:29.679+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>FIR Filters Using Chebyshev Window (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;fp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;f = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;r = input(&#39;Enter the ripple value(in dBs) = &#39;);&lt;br /&gt;wp = 2*fp/f;&lt;br /&gt;ws = 2*fs/f;&lt;br /&gt;num = -20*log10(sqrt(rp*rs))-13;&lt;br /&gt;dem = 14.6*(fs-fp)/f;&lt;br /&gt;n = ceil(num/dem);&lt;br /&gt;if(rem(n,2)==0)&lt;br /&gt;n = n+1;&lt;br /&gt;end&lt;br /&gt;y = chebwin(n,r);&lt;br /&gt;% low-pass filter&lt;br /&gt;b = fir1(n-1,wp,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of LPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% high-pass filter&lt;br /&gt;b = fir1(n-1,wp,&#39;high&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of HPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band pass filter&lt;br /&gt;wn = [wp ws];&lt;br /&gt;b = fir1(n-1,wn,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,3);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band stop filter&lt;br /&gt;b = fir1(n-1,wn,&#39;stop&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,4);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BSF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.03&lt;br /&gt;Enter the stopband ripple = 0.02&lt;br /&gt;Enter the passband frequency = 1800&lt;br /&gt;Enter the stopband frequency = 2400&lt;br /&gt;Enter the sampling frequency = 10000&lt;br /&gt;Enter the ripple value(in dBs) = 40&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnHrvyT4koHcATSyrsQnKlNzZqZeByPg3xyNa-6G9GaekJowH3c_bc-9_QURKHRY4N5ist6bVJiezKbYiGdy4-Xctwv5hIU70NGVWZ2bCTzx7Ccsaz20CxeYsOfPooQEKb1TOJXdvAzDo/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnHrvyT4koHcATSyrsQnKlNzZqZeByPg3xyNa-6G9GaekJowH3c_bc-9_QURKHRY4N5ist6bVJiezKbYiGdy4-Xctwv5hIU70NGVWZ2bCTzx7Ccsaz20CxeYsOfPooQEKb1TOJXdvAzDo/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/5740632285512469509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-chebyshev-window.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/5740632285512469509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/5740632285512469509'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-chebyshev-window.html' title='FIR Filters Using Chebyshev Window (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnHrvyT4koHcATSyrsQnKlNzZqZeByPg3xyNa-6G9GaekJowH3c_bc-9_QURKHRY4N5ist6bVJiezKbYiGdy4-Xctwv5hIU70NGVWZ2bCTzx7Ccsaz20CxeYsOfPooQEKb1TOJXdvAzDo/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-99103650419304384</id><published>2013-04-26T18:21:00.003+05:30</published><updated>2013-04-26T18:21:37.268+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>FIR Filters Using Kaiser Window (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;fp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;f = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;beta = input(&#39;Enter the beta value = &#39;);&lt;br /&gt;wp = 2*fp/f;&lt;br /&gt;ws = 2*fs/f;&lt;br /&gt;num = -20*log10(sqrt(rp*rs))-13;&lt;br /&gt;dem = 14.6*(fs-fp)/f;&lt;br /&gt;n = ceil(num/dem);&lt;br /&gt;n1 = n+1;&lt;br /&gt;if (rem(n,2)~=0)&lt;br /&gt;n1 = n;&lt;br /&gt;n = n-1;&lt;br /&gt;end&lt;br /&gt;y = kaiser(n1,beta);&lt;br /&gt;% low-pass filter&lt;br /&gt;b = fir1(n,wp,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of LPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% high-pass filter&lt;br /&gt;b = fir1(n,wp,&#39;high&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of HPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band pass filter&lt;br /&gt;wn = [wp ws];&lt;br /&gt;b = fir1(n,wn,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,3);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band stop filter&lt;br /&gt;b = fir1(n,wn,&#39;stop&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,4);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BSF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.02&lt;br /&gt;Enter the stopband ripple = 0.01&lt;br /&gt;Enter the passband frequency = 1000&lt;br /&gt;Enter the stopband frequency = 1500&lt;br /&gt;Enter the sampling frequency = 10000&lt;br /&gt;Enter the beta value = 5.8&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWTMpfCWZDlXIVdQb0CXqPTMVQgm3GZMGLPOIK8gsJQwKM8iDeWtZbDc2R5hXfxa2Di9xcXYgfhUC4KnvJ0bZPbVNDOw2n8pTJ64mKb14vfaa9aRU-0Ks4OCtEWT2cJN64nrKJLsMD-KU/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWTMpfCWZDlXIVdQb0CXqPTMVQgm3GZMGLPOIK8gsJQwKM8iDeWtZbDc2R5hXfxa2Di9xcXYgfhUC4KnvJ0bZPbVNDOw2n8pTJ64mKb14vfaa9aRU-0Ks4OCtEWT2cJN64nrKJLsMD-KU/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/99103650419304384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-kaiser-window-matlab.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/99103650419304384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/99103650419304384'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-kaiser-window-matlab.html' title='FIR Filters Using Kaiser Window (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWTMpfCWZDlXIVdQb0CXqPTMVQgm3GZMGLPOIK8gsJQwKM8iDeWtZbDc2R5hXfxa2Di9xcXYgfhUC4KnvJ0bZPbVNDOw2n8pTJ64mKb14vfaa9aRU-0Ks4OCtEWT2cJN64nrKJLsMD-KU/s72-c/untitled.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-3665053358310824719</id><published>2013-04-25T13:47:00.004+05:30</published><updated>2013-04-25T13:47:49.956+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>FIR Filters Using Hanning Window (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;fp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;f = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;wp = 2*fp/f;&lt;br /&gt;ws = 2*fs/f;&lt;br /&gt;num = -20*log10(sqrt(rp*rs))-13;&lt;br /&gt;dem = 14.6*(fs-fp)/f;&lt;br /&gt;n = ceil(num/dem);&lt;br /&gt;n1 = n+1;&lt;br /&gt;if (rem(n,2)~=0)&lt;br /&gt;n1 = n;&lt;br /&gt;n = n-1;&lt;br /&gt;end&lt;br /&gt;y = hanning(n1);&lt;br /&gt;% low-pass filter&lt;br /&gt;b = fir1(n,wp,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of LPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% high-pass filter&lt;br /&gt;b = fir1(n,wp,&#39;high&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of HPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band pass filter&lt;br /&gt;wn = [wp ws];&lt;br /&gt;b = fir1(n,wn,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,3);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band stop filter&lt;br /&gt;b = fir1(n,wn,&#39;stop&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,4);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BSF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.03&lt;br /&gt;Enter the stopband ripple = 0.01&lt;br /&gt;Enter the passband frequency = 1400&lt;br /&gt;Enter the stopband frequency = 2000&lt;br /&gt;Enter the sampling frequency = 8000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6rHSAODdrEwaUfP0J2wib_XQRfbYHWlHOQB-0koUKPzzu5hupUjbwQudy_6OmxYWndlCBeGL2nJ-lrGFFv87hU6dilARH6Pv98PjDFkLhCOY64r3iWwYtNuvyqMP8UVW4mlBpp2BH0bY/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6rHSAODdrEwaUfP0J2wib_XQRfbYHWlHOQB-0koUKPzzu5hupUjbwQudy_6OmxYWndlCBeGL2nJ-lrGFFv87hU6dilARH6Pv98PjDFkLhCOY64r3iWwYtNuvyqMP8UVW4mlBpp2BH0bY/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/3665053358310824719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-hanning-window-matlab.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/3665053358310824719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/3665053358310824719'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-hanning-window-matlab.html' title='FIR Filters Using Hanning Window (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6rHSAODdrEwaUfP0J2wib_XQRfbYHWlHOQB-0koUKPzzu5hupUjbwQudy_6OmxYWndlCBeGL2nJ-lrGFFv87hU6dilARH6Pv98PjDFkLhCOY64r3iWwYtNuvyqMP8UVW4mlBpp2BH0bY/s72-c/untitled.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-1697103005112765181</id><published>2013-04-25T13:45:00.002+05:30</published><updated>2013-04-25T13:45:23.301+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>FIR Filters Using Hamming Window (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;fp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;f = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;wp = 2*fp/f;&lt;br /&gt;ws = 2*fs/f;&lt;br /&gt;num = -20*log10(sqrt(rp*rs))-13;&lt;br /&gt;dem = 14.6*(fs-fp)/f;&lt;br /&gt;n = ceil(num/dem);&lt;br /&gt;n1 = n+1;&lt;br /&gt;if (rem(n,2)==50)&lt;br /&gt;n1 = n;&lt;br /&gt;n = n-1;&lt;br /&gt;end&lt;br /&gt;y = hamming(n1);&lt;br /&gt;% low-pass filter&lt;br /&gt;b = fir1(n,wp,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of LPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% high-pass filter&lt;br /&gt;b = fir1(n,wp,&#39;high&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of HPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band pass filter&lt;br /&gt;wn = [wp ws];&lt;br /&gt;b = fir1(n,wn,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,3);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band stop filter&lt;br /&gt;b = fir1(n,wn,&#39;stop&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,4);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BSF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.02&lt;br /&gt;Enter the stopband ripple = 0.01&lt;br /&gt;Enter the passband frequency = 1200&lt;br /&gt;Enter the stopband frequency = 1700&lt;br /&gt;Enter the sampling frequency = 9000&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6FwwqwZR9iWFFYq6oveZG581P3eyO4hDGq3KsbKOiWj-nBU8h5t6mDYBYuGf7ON3-KHSxBsosFx5n4Php-ToJ2oc4xLyRze28rupOOjWoUoZDDXxI1HnkSdOAMiGmiU6hTIJYzHrOkFA/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6FwwqwZR9iWFFYq6oveZG581P3eyO4hDGq3KsbKOiWj-nBU8h5t6mDYBYuGf7ON3-KHSxBsosFx5n4Php-ToJ2oc4xLyRze28rupOOjWoUoZDDXxI1HnkSdOAMiGmiU6hTIJYzHrOkFA/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/1697103005112765181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-hamming-window-matlab.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/1697103005112765181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/1697103005112765181'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-hamming-window-matlab.html' title='FIR Filters Using Hamming Window (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6FwwqwZR9iWFFYq6oveZG581P3eyO4hDGq3KsbKOiWj-nBU8h5t6mDYBYuGf7ON3-KHSxBsosFx5n4Php-ToJ2oc4xLyRze28rupOOjWoUoZDDXxI1HnkSdOAMiGmiU6hTIJYzHrOkFA/s72-c/untitled.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-4354955822362692921</id><published>2013-04-25T13:39:00.004+05:30</published><updated>2013-04-25T13:39:56.113+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>FIR Filters Using Blackman Window (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;fp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;f = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;wp = 2*fp/f;&lt;br /&gt;ws = 2*fs/f;&lt;br /&gt;num = -20*log10(sqrt(rp*rs))-13;&lt;br /&gt;dem = 14.6*(fs-fp)/f;&lt;br /&gt;n = ceil(num/dem);&lt;br /&gt;n1 = n+1;&lt;br /&gt;if (rem(n,2)==50)&lt;br /&gt;n1 = n;&lt;br /&gt;n = n-1;&lt;br /&gt;end&lt;br /&gt;y = blackman(n1);&lt;br /&gt;% low-pass filter&lt;br /&gt;b = fir1(n,wp,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of LPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% high-pass filter&lt;br /&gt;b = fir1(n,wp,&#39;high&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of HPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band pass filter&lt;br /&gt;wn = [wp ws];&lt;br /&gt;b = fir1(n,wn,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,3);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band stop filter&lt;br /&gt;b = fir1(n,wn,&#39;stop&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,4);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BSF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.03&lt;br /&gt;Enter the stopband ripple = 0.01&lt;br /&gt;Enter the passband frequency = 2000&lt;br /&gt;Enter the stopband frequency = 2500&lt;br /&gt;Enter the sampling frequency = 7000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6jiHv4i5RdXoe3OPO1gjfe0qyOqXsG8JTWgZHwZLLB-FSD0wxTqZd_rQhWUpVN9foS7lepvo_j5q5TeE1qrtqLkDielcXat8XqvCPCpgoGOWJalHSFBX_xzPViGZENDHikcd42a7e_fo/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6jiHv4i5RdXoe3OPO1gjfe0qyOqXsG8JTWgZHwZLLB-FSD0wxTqZd_rQhWUpVN9foS7lepvo_j5q5TeE1qrtqLkDielcXat8XqvCPCpgoGOWJalHSFBX_xzPViGZENDHikcd42a7e_fo/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/4354955822362692921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-blackman-window.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4354955822362692921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4354955822362692921'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-blackman-window.html' title='FIR Filters Using Blackman Window (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6jiHv4i5RdXoe3OPO1gjfe0qyOqXsG8JTWgZHwZLLB-FSD0wxTqZd_rQhWUpVN9foS7lepvo_j5q5TeE1qrtqLkDielcXat8XqvCPCpgoGOWJalHSFBX_xzPViGZENDHikcd42a7e_fo/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-2035252725050893695</id><published>2013-04-25T13:37:00.002+05:30</published><updated>2013-04-25T13:37:11.888+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>FIR Filters Using Bartlett Window (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;fp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;f = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;wp = 2*fp/f;&lt;br /&gt;ws = 2*fs/f;&lt;br /&gt;num = -20*log10(sqrt(rp*rs))-13;&lt;br /&gt;dem = 14.6*(fs-fp)/f;&lt;br /&gt;n = ceil(num/dem);&lt;br /&gt;n1 = n+1;&lt;br /&gt;if (rem(n,2)==50)&lt;br /&gt;n1 = n;&lt;br /&gt;n = n-1;&lt;br /&gt;end&lt;br /&gt;y = bartlett(n1);&lt;br /&gt;% low-pass filter&lt;br /&gt;b = fir1(n,wp,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of LPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% high-pass filter&lt;br /&gt;b = fir1(n,wp,&#39;high&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of HPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band pass filter&lt;br /&gt;wn = [wp ws];&lt;br /&gt;b = fir1(n,wn,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,3);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band stop filter&lt;br /&gt;b = fir1(n,wn,&#39;stop&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,4);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BSF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.04&lt;br /&gt;Enter the stopband ripple = 0.02&lt;br /&gt;Enter the passband frequency = 1500&lt;br /&gt;Enter the stopband frequency = 2000&lt;br /&gt;Enter the sampling frequency = 8000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYJgKeUKXuKmLhGPinjQjI-GQCS7wr2lI37atzRbKjo8tK2yfWzKfOdEOuGB7i8fwRBl84b9PWIjlYQ28294-Dwt4Agy3UgqocIa46IvEeHz9me892CTbSDK-DwTMBjBwnA1Yr-9xrDM/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYJgKeUKXuKmLhGPinjQjI-GQCS7wr2lI37atzRbKjo8tK2yfWzKfOdEOuGB7i8fwRBl84b9PWIjlYQ28294-Dwt4Agy3UgqocIa46IvEeHz9me892CTbSDK-DwTMBjBwnA1Yr-9xrDM/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/2035252725050893695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-bartlett-window.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/2035252725050893695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/2035252725050893695'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-bartlett-window.html' title='FIR Filters Using Bartlett Window (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlYJgKeUKXuKmLhGPinjQjI-GQCS7wr2lI37atzRbKjo8tK2yfWzKfOdEOuGB7i8fwRBl84b9PWIjlYQ28294-Dwt4Agy3UgqocIa46IvEeHz9me892CTbSDK-DwTMBjBwnA1Yr-9xrDM/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-5445788064569070927</id><published>2013-04-25T13:34:00.001+05:30</published><updated>2013-04-25T13:34:11.633+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>FIR Filters Using Rectangular Window (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;fp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;f = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;wp = 2*fp/f;&lt;br /&gt;ws = 2*fs/f;&lt;br /&gt;num = -20*log10(sqrt(rp*rs))-13;&lt;br /&gt;dem = 14.6*(fs-fp)/f;&lt;br /&gt;n = ceil(num/dem);&lt;br /&gt;n1 = n+1;&lt;br /&gt;if (rem(n,2)==50)&lt;br /&gt;n1 = n;&lt;br /&gt;n = n-1;&lt;br /&gt;end&lt;br /&gt;y = boxcar(n1);&lt;br /&gt;% low-pass filter&lt;br /&gt;b = fir1(n,wp,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,1);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of LPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% high-pass filter&lt;br /&gt;b = fir1(n,wp,&#39;high&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,2);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of HPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band pass filter&lt;br /&gt;wn = [wp ws];&lt;br /&gt;b = fir1(n,wn,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,3);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BPF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;% band stop filter&lt;br /&gt;b = fir1(n,wn,&#39;stop&#39;,y);&lt;br /&gt;[h,o] = freqz(b,1,256);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;subplot(2,2,4);&lt;br /&gt;plot(o/pi,m);&lt;br /&gt;title(&#39;Magnitude Response of BSF&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.05&lt;br /&gt;Enter the stopband ripple = 0.04&lt;br /&gt;Enter the passband frequency = 1500&lt;br /&gt;Enter the stopband frequency = 2000&lt;br /&gt;Enter the sampling frequency = 9000&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVYylHuzpNiEviI1nGS_qORv7nzS7enYHohG_KUKrSJb8ID9ohPZpDNdK5oWZgMaa4RUWeAvkcdEG80zxLn5JVc_OL0vZkyO2FLXgZJOXMX-F-Pv1WXxOr3l6sDAWz9pWA7g04wspPw-c/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVYylHuzpNiEviI1nGS_qORv7nzS7enYHohG_KUKrSJb8ID9ohPZpDNdK5oWZgMaa4RUWeAvkcdEG80zxLn5JVc_OL0vZkyO2FLXgZJOXMX-F-Pv1WXxOr3l6sDAWz9pWA7g04wspPw-c/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/5445788064569070927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-rectangular-window.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/5445788064569070927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/5445788064569070927'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/fir-filters-using-rectangular-window.html' title='FIR Filters Using Rectangular Window (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVYylHuzpNiEviI1nGS_qORv7nzS7enYHohG_KUKrSJb8ID9ohPZpDNdK5oWZgMaa4RUWeAvkcdEG80zxLn5JVc_OL0vZkyO2FLXgZJOXMX-F-Pv1WXxOr3l6sDAWz9pWA7g04wspPw-c/s72-c/untitled.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-8949214573083513402</id><published>2013-04-25T13:29:00.004+05:30</published><updated>2013-04-25T13:29:40.107+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 2 Digital Band Stop Filter Using Function (Matlab 2012a) </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n] = cheb2ord(w1,w2,rp,rs);&lt;br /&gt;wn = [w1 w2];&lt;br /&gt;[b,a] = cheby2(n,rs,wn,&#39;stop&#39;);&lt;br /&gt;w = 0:0.1/pi:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.3&lt;br /&gt;Enter the stopband ripple = 46&lt;br /&gt;Enter the passband frequency = 1400&lt;br /&gt;Enter the stopband frequency = 2000&lt;br /&gt;Enter the sampling frequency = 8000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhob4QQqF952eswRYmFnJNvTe0X2pXNppJ8YNaVQAcUQxeD98qKQG1OrDX1yBHSpf3tC-dNSjO82VI24HAYbcKhHkpxk1zkN1IioZ4nRg3nR7vKH8Ax96AuyMtZlRoS30bKmb87yIn-8FY/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhob4QQqF952eswRYmFnJNvTe0X2pXNppJ8YNaVQAcUQxeD98qKQG1OrDX1yBHSpf3tC-dNSjO82VI24HAYbcKhHkpxk1zkN1IioZ4nRg3nR7vKH8Ax96AuyMtZlRoS30bKmb87yIn-8FY/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/8949214573083513402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-digital-band-stop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/8949214573083513402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/8949214573083513402'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-digital-band-stop.html' title='Chebyshev Type 2 Digital Band Stop Filter Using Function (Matlab 2012a) '/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhob4QQqF952eswRYmFnJNvTe0X2pXNppJ8YNaVQAcUQxeD98qKQG1OrDX1yBHSpf3tC-dNSjO82VI24HAYbcKhHkpxk1zkN1IioZ4nRg3nR7vKH8Ax96AuyMtZlRoS30bKmb87yIn-8FY/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-7365366958550939880</id><published>2013-04-25T13:27:00.000+05:30</published><updated>2013-04-25T13:27:00.065+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 2 Digital Band Pass Filter Using Function (Matlab 2012a) </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n] = cheb2ord(w1,w2,rp,rs);&lt;br /&gt;wn = [w1 w2];&lt;br /&gt;[b,a] = cheby2(n,rs,wn,&#39;bandpass&#39;);&lt;br /&gt;w = 0:0.01/pi:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.4&lt;br /&gt;Enter the stopband ripple = 40&lt;br /&gt;Enter the passband frequency = 1400&lt;br /&gt;Enter the stopband frequency = 2000&lt;br /&gt;Enter the sampling frequency = 9000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKXuvhZQy_93HJXaD_WFXX4B5MWxrCxRxoKPOTJP4zprNV0P7ws51Oba0v75OYY0vMUvMmyG84V4edGNBslL7DLHUI1i_e9BYO8zbCo5O-POet3I6e_8V5ST3-uDBZmYioQOY91Wd07MY/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKXuvhZQy_93HJXaD_WFXX4B5MWxrCxRxoKPOTJP4zprNV0P7ws51Oba0v75OYY0vMUvMmyG84V4edGNBslL7DLHUI1i_e9BYO8zbCo5O-POet3I6e_8V5ST3-uDBZmYioQOY91Wd07MY/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/7365366958550939880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-digital-band-pass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/7365366958550939880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/7365366958550939880'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-digital-band-pass.html' title='Chebyshev Type 2 Digital Band Pass Filter Using Function (Matlab 2012a) '/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKXuvhZQy_93HJXaD_WFXX4B5MWxrCxRxoKPOTJP4zprNV0P7ws51Oba0v75OYY0vMUvMmyG84V4edGNBslL7DLHUI1i_e9BYO8zbCo5O-POet3I6e_8V5ST3-uDBZmYioQOY91Wd07MY/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-1108874298066114506</id><published>2013-04-25T13:22:00.001+05:30</published><updated>2013-04-25T13:22:15.172+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 2 Digital High Pass Filter Using Function (Matlab 2012a) </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n,wn] = cheb2ord(w1,w2,rp,rs);&lt;br /&gt;[b,a] = cheby2(n,rs,wn,&#39;high&#39;);&lt;br /&gt;w = 0:0.01/pi:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.25&lt;br /&gt;Enter the stopband ripple = 40&lt;br /&gt;Enter the passband frequency = 1400&lt;br /&gt;Enter the stopband frequency = 1800&lt;br /&gt;Enter the sampling frequency = 7000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaX66F0_NM2-YlXu1cNK6VpvO3T0R2tmIL4usQ9MGue3soOfAVOEuR7weJXY9nJS0B_rybcRH2dPBLK_3udPaR3PMDnp7MoL7eiE8IPNpOuaIC-EY5CzpdOfcrVigBUEN3kUr9tBb-pww/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaX66F0_NM2-YlXu1cNK6VpvO3T0R2tmIL4usQ9MGue3soOfAVOEuR7weJXY9nJS0B_rybcRH2dPBLK_3udPaR3PMDnp7MoL7eiE8IPNpOuaIC-EY5CzpdOfcrVigBUEN3kUr9tBb-pww/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/1108874298066114506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-digital-high-pass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/1108874298066114506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/1108874298066114506'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-digital-high-pass.html' title='Chebyshev Type 2 Digital High Pass Filter Using Function (Matlab 2012a) '/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaX66F0_NM2-YlXu1cNK6VpvO3T0R2tmIL4usQ9MGue3soOfAVOEuR7weJXY9nJS0B_rybcRH2dPBLK_3udPaR3PMDnp7MoL7eiE8IPNpOuaIC-EY5CzpdOfcrVigBUEN3kUr9tBb-pww/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-4947819661777851175</id><published>2013-04-25T13:19:00.004+05:30</published><updated>2013-04-25T13:19:42.834+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 2 Digital Low Pass Filter Using Function (Matlab 2012a) </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n,wn] = cheb2ord(w1,w2,rp,rs);&lt;br /&gt;[b,a] = cheby2(n,rs,wn);&lt;br /&gt;w = 0:0.01:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.35&lt;br /&gt;Enter the stopband ripple = 35&lt;br /&gt;Enter the passband frequency = 1500&lt;br /&gt;Enter the stopband frequency = 2000&lt;br /&gt;Enter the sampling frequency = 8000&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7F9QoCzPcSgb8qBSVzR5dzywivjuI8TnAcPcYNu4jB6X-xl3yPbTcLYFgXbD5XFkw01ANrMMOOgYMWr_Wg-aJb-K8-VfTZJTP3uZ2nlJDPIbWgypNUiouV5cGUCrNCdU6SWgyVysEong/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7F9QoCzPcSgb8qBSVzR5dzywivjuI8TnAcPcYNu4jB6X-xl3yPbTcLYFgXbD5XFkw01ANrMMOOgYMWr_Wg-aJb-K8-VfTZJTP3uZ2nlJDPIbWgypNUiouV5cGUCrNCdU6SWgyVysEong/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/4947819661777851175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-digital-low-pass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4947819661777851175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4947819661777851175'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-digital-low-pass.html' title='Chebyshev Type 2 Digital Low Pass Filter Using Function (Matlab 2012a) '/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7F9QoCzPcSgb8qBSVzR5dzywivjuI8TnAcPcYNu4jB6X-xl3yPbTcLYFgXbD5XFkw01ANrMMOOgYMWr_Wg-aJb-K8-VfTZJTP3uZ2nlJDPIbWgypNUiouV5cGUCrNCdU6SWgyVysEong/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-4850039546777440215</id><published>2013-04-25T12:52:00.003+05:30</published><updated>2013-04-25T12:52:24.445+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 1 Digital Band Stop Filter Using Function (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n] = cheb1ord(w1,w2,rp,rs);&lt;br /&gt;wn = [w1 w2];&lt;br /&gt;[b,a] = cheby1(n,rp,wn,&#39;stop&#39;);&lt;br /&gt;w = 0:0.1/pi:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.25&lt;br /&gt;Enter the stopband ripple = 40&lt;br /&gt;Enter the passband frequency = 2500&lt;br /&gt;Enter the stopband frequency = 2750&lt;br /&gt;Enter the sampling frequency = 7000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9WAxCp9TNtnyuFnMl3BM2fgAyGD7HXX6bbPhRNsBlZahvdNPlwCcbJtjao3PQXpwhOyXhCRWzUkElNI3nQwO6Ku9pOYWSikfjydJbE7FVK5E3iSNP7vB0Pkdx6N7MGLO8pwE4v3S_oHk/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9WAxCp9TNtnyuFnMl3BM2fgAyGD7HXX6bbPhRNsBlZahvdNPlwCcbJtjao3PQXpwhOyXhCRWzUkElNI3nQwO6Ku9pOYWSikfjydJbE7FVK5E3iSNP7vB0Pkdx6N7MGLO8pwE4v3S_oHk/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/4850039546777440215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-1-digital-band-stop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4850039546777440215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4850039546777440215'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-1-digital-band-stop.html' title='Chebyshev Type 1 Digital Band Stop Filter Using Function (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9WAxCp9TNtnyuFnMl3BM2fgAyGD7HXX6bbPhRNsBlZahvdNPlwCcbJtjao3PQXpwhOyXhCRWzUkElNI3nQwO6Ku9pOYWSikfjydJbE7FVK5E3iSNP7vB0Pkdx6N7MGLO8pwE4v3S_oHk/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-9036898630734911788</id><published>2013-04-25T12:49:00.003+05:30</published><updated>2013-04-25T12:49:25.338+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 1 Digital Band Pass Filter Using Function (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n] = cheb1ord(w1,w2,rp,rs);&lt;br /&gt;wn = [w1 w2];&lt;br /&gt;[b,a] = cheby1(n,rp,wn,&#39;bandpass&#39;);&lt;br /&gt;w = 0:0.01:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.4&lt;br /&gt;Enter the stopband ripple = 35&lt;br /&gt;Enter the passband frequency = 2000&lt;br /&gt;Enter the stopband frequency = 2500&lt;br /&gt;Enter the sampling frequency = 10000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaL8xFSLZU3X_EonnDvwUqtT60e_krwt0JdfNE4f-YS4Wx_uYKKnjk4tAvYKvRLFHciZ4ozv8X11TB9AOj_7WvcsidcdU2QlaeTv514k4hHw2wKbH1LDhft9ejiWNJeQD3LHmxjmNToCI/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaL8xFSLZU3X_EonnDvwUqtT60e_krwt0JdfNE4f-YS4Wx_uYKKnjk4tAvYKvRLFHciZ4ozv8X11TB9AOj_7WvcsidcdU2QlaeTv514k4hHw2wKbH1LDhft9ejiWNJeQD3LHmxjmNToCI/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/9036898630734911788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-1-digital-band-pass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/9036898630734911788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/9036898630734911788'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-1-digital-band-pass.html' title='Chebyshev Type 1 Digital Band Pass Filter Using Function (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaL8xFSLZU3X_EonnDvwUqtT60e_krwt0JdfNE4f-YS4Wx_uYKKnjk4tAvYKvRLFHciZ4ozv8X11TB9AOj_7WvcsidcdU2QlaeTv514k4hHw2wKbH1LDhft9ejiWNJeQD3LHmxjmNToCI/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-5133731528538641613</id><published>2013-04-25T12:45:00.004+05:30</published><updated>2013-04-25T12:45:54.772+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 1 Digital High Pass Filter Using Function (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n,wn] = cheb1ord(w1,w2,rp,rs);&lt;br /&gt;[b,a] = cheby1(n,rp,wn,&#39;high&#39;);&lt;br /&gt;w = 0:0.01/pi:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.3&lt;br /&gt;Enter the stopband ripple = 60&lt;br /&gt;Enter the passband frequency = 1500&lt;br /&gt;Enter the stopband frequency = 2000&lt;br /&gt;Enter the sampling frequency = 9000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDm0oouVXGWWNotkmeEFSTGuL1S3oMWz8Z1Kvk1u_hWGqmbKGsTRLsfajFwTkvH84cVV_P2OxEiLYciSOoruFrssuy6AmLafyC_RaaUe8eg-QTws1hQuYl37LHPi9v55yRj7PQrw4Yrg/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDm0oouVXGWWNotkmeEFSTGuL1S3oMWz8Z1Kvk1u_hWGqmbKGsTRLsfajFwTkvH84cVV_P2OxEiLYciSOoruFrssuy6AmLafyC_RaaUe8eg-QTws1hQuYl37LHPi9v55yRj7PQrw4Yrg/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/5133731528538641613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-1-digital-high-pass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/5133731528538641613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/5133731528538641613'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-1-digital-high-pass.html' title='Chebyshev Type 1 Digital High Pass Filter Using Function (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZDm0oouVXGWWNotkmeEFSTGuL1S3oMWz8Z1Kvk1u_hWGqmbKGsTRLsfajFwTkvH84cVV_P2OxEiLYciSOoruFrssuy6AmLafyC_RaaUe8eg-QTws1hQuYl37LHPi9v55yRj7PQrw4Yrg/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-6065239049260970000</id><published>2013-04-25T12:41:00.005+05:30</published><updated>2013-04-25T12:41:48.351+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 1 Digital Low Pass Filter Using Function (Matlab 2012a) </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n,wn] = cheb1ord(w1,w2,rp,rs);&lt;br /&gt;[b,a] = cheby1(n,rp,wn);&lt;br /&gt;w = 0:0.01:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.2&lt;br /&gt;Enter the stopband ripple = 45&lt;br /&gt;Enter the passband frequency = 1300&lt;br /&gt;Enter the stopband frequency = 1500&lt;br /&gt;Enter the sampling frequency = 10000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_VNljlm-u2_LTcR8o4b66wyAOKYCm6Iw0-qcCu-4V48Hv_QlVfrWjyktxuHjFTzGUFDMCZir5O81ITfZ2GfUKJPfwCWR5o65K2jCl_SAysN3FlPXFXnLxgH2ktIHPT2KdQRzvvRwVO4c/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_VNljlm-u2_LTcR8o4b66wyAOKYCm6Iw0-qcCu-4V48Hv_QlVfrWjyktxuHjFTzGUFDMCZir5O81ITfZ2GfUKJPfwCWR5o65K2jCl_SAysN3FlPXFXnLxgH2ktIHPT2KdQRzvvRwVO4c/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/6065239049260970000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-1-digital-low-pass.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/6065239049260970000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/6065239049260970000'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-1-digital-low-pass.html' title='Chebyshev Type 1 Digital Low Pass Filter Using Function (Matlab 2012a) '/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_VNljlm-u2_LTcR8o4b66wyAOKYCm6Iw0-qcCu-4V48Hv_QlVfrWjyktxuHjFTzGUFDMCZir5O81ITfZ2GfUKJPfwCWR5o65K2jCl_SAysN3FlPXFXnLxgH2ktIHPT2KdQRzvvRwVO4c/s72-c/untitled.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-3866104429146960807</id><published>2013-04-25T12:37:00.000+05:30</published><updated>2013-04-25T12:37:05.241+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Butterworth Digital Band Stop Filter Using Function (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n] = buttord(w1,w2,rp,rs);&lt;br /&gt;wn = [w1 w2];&lt;br /&gt;[b,a] = butter(n,wn,&#39;stop&#39;);&lt;br /&gt;w = 0:0.01:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.4&lt;br /&gt;Enter the stopband ripple = 46&lt;br /&gt;Enter the passband frequency = 1100&lt;br /&gt;Enter the stopband frequency = 2200&lt;br /&gt;Enter the sampling frequency = 6000&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-JkeDL7bfr-GrIt0PW_ENdiAK4UNe-F-ME-hVfh_wnp8nWDgrqg1q5BbZ49u8I5jxEB_aUKC-MhgIAD8c_QdRLKXxkMeK1hmnEhaJQ4jmIyfk8hy65zyNyxbAk0wuGWOirxMUIm_g-Hs/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-JkeDL7bfr-GrIt0PW_ENdiAK4UNe-F-ME-hVfh_wnp8nWDgrqg1q5BbZ49u8I5jxEB_aUKC-MhgIAD8c_QdRLKXxkMeK1hmnEhaJQ4jmIyfk8hy65zyNyxbAk0wuGWOirxMUIm_g-Hs/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/3866104429146960807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/butterworth-digital-band-stop-filter.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/3866104429146960807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/3866104429146960807'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/butterworth-digital-band-stop-filter.html' title='Butterworth Digital Band Stop Filter Using Function (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-JkeDL7bfr-GrIt0PW_ENdiAK4UNe-F-ME-hVfh_wnp8nWDgrqg1q5BbZ49u8I5jxEB_aUKC-MhgIAD8c_QdRLKXxkMeK1hmnEhaJQ4jmIyfk8hy65zyNyxbAk0wuGWOirxMUIm_g-Hs/s72-c/untitled.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-8561658630560591990</id><published>2013-04-25T12:31:00.002+05:30</published><updated>2013-04-25T12:31:27.851+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Butterworth Digital Band Pass Filter Using Function (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clear all;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;w1 = 2*wp/fs;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;w2 = 2*ws/fs;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;[n] = buttord(w1,w2,rp,rs);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;wn = [w1 w2];&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;[b,a] = butter(n,wn,&#39;bandpass&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;w = 0:0.01:pi;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;[h,om] = freqz(b,a,w);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;m = 20*log10(abs(h));&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;an = angle(h);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;subplot(2,1,1);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;plot(om/pi,m);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;subplot(2,1,1);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;plot(om/pi,m);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;title(&#39;Magnitude Response&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;subplot(2,1,2);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;plot(om/pi,an);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;title(&#39;Phase Response&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the stopband ripple = 40&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband frequency = 1500&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the stopband frequency = 2000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the sampling frequency = 9000 &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHLOLBdIb1FY-sCxt-HLXsILxo31yWJshlQLZ4OYFI5uAWIjCcE60qk2C0Wi9Oym2kllhLBAlmEY8ZeZq5dqqnM08YZZzJPT9iRqV-kVJ8VSJIxCoKlI-beFdGNId-Ng0UmI4fENTFfY/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHLOLBdIb1FY-sCxt-HLXsILxo31yWJshlQLZ4OYFI5uAWIjCcE60qk2C0Wi9Oym2kllhLBAlmEY8ZeZq5dqqnM08YZZzJPT9iRqV-kVJ8VSJIxCoKlI-beFdGNId-Ng0UmI4fENTFfY/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/8561658630560591990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/butterworth-digital-band-pass-filter.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/8561658630560591990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/8561658630560591990'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/butterworth-digital-band-pass-filter.html' title='Butterworth Digital Band Pass Filter Using Function (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwHLOLBdIb1FY-sCxt-HLXsILxo31yWJshlQLZ4OYFI5uAWIjCcE60qk2C0Wi9Oym2kllhLBAlmEY8ZeZq5dqqnM08YZZzJPT9iRqV-kVJ8VSJIxCoKlI-beFdGNId-Ng0UmI4fENTFfY/s72-c/untitled.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-4565934739938655267</id><published>2013-04-25T01:45:00.000+05:30</published><updated>2013-04-25T01:45:09.760+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Butterworth Digital High Pass Filter Using Function (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n,wn] = buttord(w1,w2,rp,rs);&lt;br /&gt;[b,a] = butter(n,wn,&#39;high&#39;);&lt;br /&gt;w = 0:0.01:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.5&lt;br /&gt;Enter the stopband ripple = 50&lt;br /&gt;Enter the passband frequency = 1200&lt;br /&gt;Enter the stopband frequency = 2400&lt;br /&gt;Enter the sampling frequency = 10000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5h7jyp5j6YbQQ_bEyEQ5ADIoD-p8ozlwUpFFOzgnlhGIkS9QpI4Jinl3Vk_6Sti_cPRaJRyMIKDwOnnQbCF3apwWYeAUAI27jmziyc5nIpvDiCy5ifoShaMyOfs5yLiS9qSmTP7oovRE/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5h7jyp5j6YbQQ_bEyEQ5ADIoD-p8ozlwUpFFOzgnlhGIkS9QpI4Jinl3Vk_6Sti_cPRaJRyMIKDwOnnQbCF3apwWYeAUAI27jmziyc5nIpvDiCy5ifoShaMyOfs5yLiS9qSmTP7oovRE/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/4565934739938655267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/butterworth-digital-high-pass-filter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4565934739938655267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4565934739938655267'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/butterworth-digital-high-pass-filter.html' title='Butterworth Digital High Pass Filter Using Function (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5h7jyp5j6YbQQ_bEyEQ5ADIoD-p8ozlwUpFFOzgnlhGIkS9QpI4Jinl3Vk_6Sti_cPRaJRyMIKDwOnnQbCF3apwWYeAUAI27jmziyc5nIpvDiCy5ifoShaMyOfs5yLiS9qSmTP7oovRE/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-3149907773442428419</id><published>2013-04-25T01:33:00.001+05:30</published><updated>2013-04-25T01:33:05.156+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Butterworth Digital Low Pass Filter Using Function (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n,wn] = buttord(w1,w2,rp,rs);&lt;br /&gt;[b,a] = butter(n,wn);&lt;br /&gt;w = 0:0.01:pi;&lt;br /&gt;[h,om] = freqz(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.5&lt;br /&gt;Enter the stopband ripple = 50&lt;br /&gt;Enter the passband frequency = 1200&lt;br /&gt;Enter the stopband frequency = 2400&lt;br /&gt;Enter the sampling frequency = 10000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj-mNf76C3xISH3bMTifMnyPOpuDL8jl62vMr2POxFCMZiWOvvvIuYQnAUvgvKRCGEMF2QqqcfEtC2kWuv6kaTxO8LWW3rp_NrVfbqW30-zZCW6qvEH-ydN-eVNvunHy5e1_4JVlut3W0/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj-mNf76C3xISH3bMTifMnyPOpuDL8jl62vMr2POxFCMZiWOvvvIuYQnAUvgvKRCGEMF2QqqcfEtC2kWuv6kaTxO8LWW3rp_NrVfbqW30-zZCW6qvEH-ydN-eVNvunHy5e1_4JVlut3W0/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/3149907773442428419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/butterworth-digital-low-pass-filter.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/3149907773442428419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/3149907773442428419'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/butterworth-digital-low-pass-filter.html' title='Butterworth Digital Low Pass Filter Using Function (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj-mNf76C3xISH3bMTifMnyPOpuDL8jl62vMr2POxFCMZiWOvvvIuYQnAUvgvKRCGEMF2QqqcfEtC2kWuv6kaTxO8LWW3rp_NrVfbqW30-zZCW6qvEH-ydN-eVNvunHy5e1_4JVlut3W0/s72-c/untitled.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-4657236988166573770</id><published>2013-04-25T01:29:00.001+05:30</published><updated>2013-04-25T01:29:18.848+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 2 Analog Band Stop Filter Using Function (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n] = cheb2ord(w1,w2,rp,rs,&#39;s&#39;);&lt;br /&gt;wn = [w1 w2];&lt;br /&gt;[b,a] = cheby2(n,rs,wn,&#39;stop&#39;,&#39;s&#39;);&lt;br /&gt;w = 0:0.01:pi;&lt;br /&gt;[h,om] = freqs(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.25&lt;br /&gt;Enter the stopband ripple = 30&lt;br /&gt;Enter the passband frequency = 1300&lt;br /&gt;Enter the stopband frequency = 2000&lt;br /&gt;Enter the sampling frequency = 8000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJuqk2mHioHU0vuxCzAj3d-eReZCM8n8C961nHuoXJ5YfSBDrzXGhXtDKRiC0Pw62-qdO2MjHo43zYahRwqKRuz8fJQDZikaJ2JqSgV3tjvi2KTVOF5BR9a0LECf_NrDyCJPkwgIi09Cs/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJuqk2mHioHU0vuxCzAj3d-eReZCM8n8C961nHuoXJ5YfSBDrzXGhXtDKRiC0Pw62-qdO2MjHo43zYahRwqKRuz8fJQDZikaJ2JqSgV3tjvi2KTVOF5BR9a0LECf_NrDyCJPkwgIi09Cs/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/4657236988166573770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-analog-band-stop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4657236988166573770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4657236988166573770'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-analog-band-stop.html' title='Chebyshev Type 2 Analog Band Stop Filter Using Function (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJuqk2mHioHU0vuxCzAj3d-eReZCM8n8C961nHuoXJ5YfSBDrzXGhXtDKRiC0Pw62-qdO2MjHo43zYahRwqKRuz8fJQDZikaJ2JqSgV3tjvi2KTVOF5BR9a0LECf_NrDyCJPkwgIi09Cs/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8577315283395211721.post-4071875880652163362</id><published>2013-04-25T01:26:00.004+05:30</published><updated>2013-04-25T01:26:43.065+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Signal Processing"/><title type='text'>Chebyshev Type 2 Analog Band Pass Filter Using Function (Matlab 2012a)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Program:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;clc;&lt;br /&gt;clear all;&lt;br /&gt;rp = input(&#39;Enter the passband ripple = &#39;);&lt;br /&gt;rs = input(&#39;Enter the stopband ripple = &#39;);&lt;br /&gt;wp = input(&#39;Enter the passband frequency = &#39;);&lt;br /&gt;ws = input(&#39;Enter the stopband frequency = &#39;);&lt;br /&gt;fs = input(&#39;Enter the sampling frequency = &#39;);&lt;br /&gt;w1 = 2*wp/fs;&lt;br /&gt;w2 = 2*ws/fs;&lt;br /&gt;[n] = cheb2ord(w1,w2,rp,rs,&#39;s&#39;);&lt;br /&gt;wn = [w1 w2];&lt;br /&gt;[b,a] = cheby2(n,rs,wn,&#39;bandpass&#39;,&#39;s&#39;);&lt;br /&gt;w = 0:0.01:pi;&lt;br /&gt;[h,om] = freqs(b,a,w);&lt;br /&gt;m = 20*log10(abs(h));&lt;br /&gt;an = angle(h);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;subplot(2,1,1);&lt;br /&gt;plot(om/pi,m);&lt;br /&gt;title(&#39;Magnitude Response&#39;);&lt;br /&gt;ylabel(&#39;Gain in dB ----&amp;gt;&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;br /&gt;subplot(2,1,2);&lt;br /&gt;plot(om/pi,an);&lt;br /&gt;title(&#39;Phase Response&#39;);&lt;br /&gt;xlabel(&#39;Normalised Frequency ----&amp;gt;&#39;);&lt;br /&gt;ylabel(&#39;Phase in radians ----&amp;gt;&#39;);&lt;br /&gt;grid on;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Output:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Enter the passband ripple = 0.37&lt;br /&gt;Enter the stopband ripple = 37&lt;br /&gt;Enter the passband frequency = 3000&lt;br /&gt;Enter the stopband frequency = 4000&lt;br /&gt;Enter the sampling frequency = 9000&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Waveform:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7pgJUsjclQ59rUVi7DxKLX-AWca5zqUR2ZgfpB0nDb4n66T-D9vBCyd6ijZw2E92_oP6avaczEuC7dNR1BsqvD3_Sf5UeCd193N3cXViM2rgfMbgJtWT_EzHyUzliLrEf8ywOIhyphenhyphen-oTw/s1600/untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7pgJUsjclQ59rUVi7DxKLX-AWca5zqUR2ZgfpB0nDb4n66T-D9vBCyd6ijZw2E92_oP6avaczEuC7dNR1BsqvD3_Sf5UeCd193N3cXViM2rgfMbgJtWT_EzHyUzliLrEf8ywOIhyphenhyphen-oTw/s400/untitled.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;EPSILON LABS&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://newlinecode.blogspot.com/feeds/4071875880652163362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-analog-band-pass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4071875880652163362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8577315283395211721/posts/default/4071875880652163362'/><link rel='alternate' type='text/html' href='http://newlinecode.blogspot.com/2013/04/chebyshev-type-2-analog-band-pass.html' title='Chebyshev Type 2 Analog Band Pass Filter Using Function (Matlab 2012a)'/><author><name>Nebu Pulickal</name><uri>http://www.blogger.com/profile/05438914939537269591</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7pgJUsjclQ59rUVi7DxKLX-AWca5zqUR2ZgfpB0nDb4n66T-D9vBCyd6ijZw2E92_oP6avaczEuC7dNR1BsqvD3_Sf5UeCd193N3cXViM2rgfMbgJtWT_EzHyUzliLrEf8ywOIhyphenhyphen-oTw/s72-c/untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>