<?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-5684790982742506385</id><updated>2024-10-06T20:36:11.304-07:00</updated><category term="Digital Signal Processing Lab."/><category term="Microprocessors And Interfacing lab"/><category term="Numerical Analysis Lab."/><category term="Numerical Analysis"/><title type='text'>Learn</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><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>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-5577236938244801024</id><published>2009-07-25T23:19:00.000-07:00</published><updated>2009-07-25T23:29:00.377-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Numerical Analysis Lab."/><title type='text'>Bisection Method</title><content type='html'>&lt;table border=&quot;5&quot; style=&quot;color:Navy &quot;&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;th style=&quot;color:DarkSlateGray  &quot;&gt;&lt;br /&gt;&lt;h style=&quot;font-size:20px;color:Blue &quot;&gt;Theory For BISECTION METHOD:&lt;/h&gt;&lt;br /&gt;&lt;p&gt;In mathematics, the bisection method is a root-finding algorithm which repeatedly divides an &lt;br /&gt;&lt;br /&gt;interval in half and then selects the subinterval in which a root exists. It is a very simple and &lt;br /&gt;&lt;br /&gt;robust method, but it is also rather slow.Suppose we want to solve the equation&lt;br /&gt;f(x)=0,where f is a continuous function.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The bisection method starts with two points xl and xu such that f(xl) and f(xu) have opposite &lt;br /&gt;&lt;br /&gt;signs. The intermediate value theorem says that f must have at least one root in the interval &lt;br /&gt;&lt;br /&gt;[x&lt;sub&gt;l&lt;/sub&gt;,x&lt;sub&gt;u&lt;/sub&gt;]. The method now divides the interval in two by computing &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;p&gt;xr = (x&lt;sub&gt;l&lt;/sub&gt;+x&lt;sub&gt;u&lt;/sub&gt;) / 2.&lt;/p&gt;&lt;p&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;There are now two possibilities: either f(x&lt;sub&gt;l&lt;/sub&gt;) and f(x&lt;sub&gt;u&lt;/sub&gt;) have opposite &lt;br /&gt;&lt;br /&gt;signs, or f(x&lt;sub&gt;r&lt;/sub&gt;) and f(x&lt;sub&gt;l&lt;/sub&gt;) have opposite signs. The bisection algorithm is then &lt;br /&gt;&lt;br /&gt;applied recursively to the sub-interval where the sign change occurs.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;p&gt;&lt;b&gt;To determine in which sub-interval the root lies:&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;ol&gt;   &lt;br /&gt;  &lt;li&gt; If f(x&lt;sub&gt;l&lt;/sub&gt;).f(x&lt;sub&gt;r&lt;/sub&gt;)&lt;0,then we set x&lt;sub&gt;u&lt;/sub&gt;=x&lt;sub&gt;r&lt;/sub&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt; If f(x&lt;sub&gt;l&lt;/sub&gt;).f(x&lt;sub&gt;r&lt;/sub&gt;)&gt;0, then we set x&lt;sub&gt;l&lt;/sub&gt;=x&lt;sub&gt;r&lt;/sub&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt; If f(x&lt;sub&gt;l&lt;/sub&gt;).f(x&lt;sub&gt;r&lt;/sub&gt;)=0, then we set x&lt;sub&gt;t&lt;/sub&gt;=x&lt;sub&gt;r&lt;/sub&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;According to the condition we have to iterate again and again till then whenever |%error| or &lt;br /&gt;&lt;br /&gt;|e&lt;sub&gt;a&lt;/sub&gt;|=e&lt;sub&gt;s&lt;/sub&gt;. Then we have to find out the %error. The rule for determine %error &lt;br /&gt;&lt;br /&gt;is&lt;/p&gt;   &lt;p&gt;%error or e&lt;sub&gt;a&lt;/sub&gt;  = (x&lt;sub&gt;rnew&lt;/sub&gt;-x&lt;sub&gt;rold&lt;/sub&gt;)/ &lt;br /&gt;&lt;br /&gt;x&lt;sub&gt;rnew&lt;/sub&gt;*100%&lt;/p&gt;&lt;br /&gt;&lt;/th&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table border=&quot;5&quot; style=&quot;color:Navy &quot;&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;th style=&quot;color:DarkSlateGray  &quot;&gt;&lt;h style=&quot;font-size:20px;color:Blue &quot;&gt;MATLAB CODE FOR BI-SECTION METHOD OF GIVEN EUATION:&lt;/h&gt;&lt;br /&gt;&lt;p&gt;FUNCYION OF RLC:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;function f_value=RLC(R)&lt;br /&gt;&lt;br /&gt;t=0.05;&lt;br /&gt;&lt;br /&gt;q0=5e-4;&lt;br /&gt;&lt;br /&gt;q=5e-6;&lt;br /&gt;&lt;br /&gt;L=5;&lt;br /&gt;&lt;br /&gt;C=1e-4;&lt;br /&gt;&lt;br /&gt;f_value=(exp(-R*t/(2*L)))*cos(sqrt((1/(L*C))-(R/(2*L))^2)*t)-q/q0;&lt;/p&gt;&lt;br /&gt;&lt;h&gt;MAIN PROGRAM:&lt;/h&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;clc;&lt;br /&gt;&lt;br /&gt;clear all&lt;br /&gt;&lt;br /&gt;tic&lt;br /&gt;&lt;br /&gt;Rl=200;&lt;br /&gt;&lt;br /&gt;Ru=400;&lt;br /&gt;&lt;br /&gt;es=.0001;&lt;br /&gt;&lt;br /&gt;i=0;&lt;br /&gt;&lt;br /&gt;imax=25;&lt;br /&gt;&lt;br /&gt;Rr=(Rl+Ru)/2;&lt;br /&gt;&lt;br /&gt;fl=RLC(Rl)&lt;br /&gt;&lt;br /&gt;while(1)&lt;br /&gt;&lt;br /&gt;    Rrold=Rr&lt;br /&gt;&lt;br /&gt;    Rr=(Rl+Ru)/2&lt;br /&gt;&lt;br /&gt;    fr=RLC(Rr)&lt;br /&gt;&lt;br /&gt;    if Rr~=0&lt;br /&gt;&lt;br /&gt;        ea=abs((Rr-Rrold)/Rr)*100&lt;br /&gt;&lt;br /&gt;    end&lt;br /&gt;&lt;br /&gt;    test=fl*fr&lt;br /&gt;&lt;br /&gt;    if test&lt;0 ru=&quot;Rr&quot;&gt;0&lt;br /&gt;&lt;br /&gt;        Rl=Rr;&lt;br /&gt;&lt;br /&gt;        fl=fr&lt;br /&gt;&lt;br /&gt;    else&lt;br /&gt;&lt;br /&gt;        ea=0;&lt;br /&gt;&lt;br /&gt;    end&lt;br /&gt;&lt;br /&gt;    if(ea&lt;es&gt;=imax&lt;br /&gt;&lt;br /&gt;        break&lt;br /&gt;&lt;br /&gt;    end&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt; fp=fopen(&#39;iea.txt&#39;,&#39;a+&#39;);&lt;br /&gt;&lt;br /&gt; [err,msg]=ferror(fp,&#39;clear&#39;);&lt;br /&gt;&lt;br /&gt; if err~=0&lt;br /&gt;&lt;br /&gt;     disp(&#39;An error occurred while appending data to the file&#39;)&lt;br /&gt;&lt;br /&gt;     disp(msg)&lt;br /&gt;&lt;br /&gt; end&lt;br /&gt;&lt;br /&gt; fprintf(fp,&#39;%0.0f\t%8.5e\n&#39;,i,ea);&lt;br /&gt;&lt;br /&gt; err=fclose(fp);&lt;br /&gt;&lt;br /&gt; if err~=0&lt;br /&gt;&lt;br /&gt;     disp(&#39;Could not close the file&#39;)&lt;br /&gt;&lt;br /&gt; end&lt;br /&gt;&lt;br /&gt; i=i+1;&lt;br /&gt;&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;disp(&#39;The value of resistance is:&#39;)&lt;br /&gt;&lt;br /&gt;disp(Rr)&lt;br /&gt;&lt;br /&gt;disp(&#39;The value of i is:&#39;)&lt;br /&gt;&lt;br /&gt;disp(i)&lt;br /&gt;&lt;br /&gt;toc&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;5&quot; style=&quot;color:Navy &quot;&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;th style=&quot;color:DarkSlateGray  &quot;&gt;&lt;br /&gt;&lt;h style=&quot;font-size:20px;color:Blue &quot;&gt;OUTPUT&lt;/h&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;fl =&lt;br /&gt;&lt;br /&gt;-0.1631&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt; 300&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt; 300&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;-0.0295&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;     0&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt;    0.0048&lt;br /&gt;&lt;br /&gt;fl =&lt;br /&gt;&lt;br /&gt;   -0.0295&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;   300&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;   350&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;    0.0209&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;   14.2857&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt; -6.1704e-004&lt;br /&gt;&lt;br /&gt;Ru =&lt;br /&gt;&lt;br /&gt;   350&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;   350&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;   325&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;   -0.0032&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;    7.6923&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt;  9.3070e-005&lt;br /&gt;&lt;br /&gt;fl =&lt;br /&gt;&lt;br /&gt;   -0.0032&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;   325&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  337.5000&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;    0.0091&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;    3.7037&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt; -2.8865e-005&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  328.1513&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt; -1.0717e-007&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;  1.1625e-004&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt;  5.2177e-014&lt;br /&gt;&lt;br /&gt;fl =&lt;br /&gt;&lt;br /&gt; -1.0717e-007&lt;br /&gt;&lt;br /&gt; Ru =&lt;br /&gt;&lt;br /&gt;  337.5000&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  337.5000&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  331.2500&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;    0.0031&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;    1.8868&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt; -9.6751e-006&lt;br /&gt;&lt;br /&gt;Ru =&lt;br /&gt;&lt;br /&gt;  331.2500&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  331.2500&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  328.1250&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt; -2.6307e-005&lt;br /&gt;&lt;br /&gt;ea =    0.9524&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt;  8.2989e-008&lt;br /&gt;&lt;br /&gt;fl =&lt;br /&gt;&lt;br /&gt; -2.6307e-005&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  328.1250&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  329.6875&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;    0.0015&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;fl =&lt;br /&gt;&lt;br /&gt; -2.0056e-006&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  328.1494&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  328.1616&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;  1.0144e-005&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;    0.0037&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt; -2.0345e-011&lt;br /&gt;&lt;br /&gt;Ru =&lt;br /&gt;&lt;br /&gt;  328.1616&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  328.1616&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  328.1513&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  328.1515&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;  8.2673e-008&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;  5.8124e-005&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt; -8.8602e-015&lt;br /&gt;&lt;br /&gt; Rr =&lt;br /&gt;&lt;br /&gt;  328.155&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;  4.0694e-006&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;    0.0019&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt; -8.1616e-012&lt;br /&gt;&lt;br /&gt;Ru =&lt;br /&gt;&lt;br /&gt;  328.1555&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  328.1555&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  328.1525&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;  1.0319e-006&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;  9.2998e-004&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt; -2.0696e-012&lt;br /&gt;&lt;br /&gt;Ru =&lt;br /&gt;&lt;br /&gt;  328.1525&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  328.1525&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  328.1509&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt; -4.8686e-004&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;  4.6499e-004&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt;  9.7646e-013&lt;br /&gt;&lt;br /&gt;fl =&lt;br /&gt;&lt;br /&gt; -4.8686e-007&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  328.1509&lt;br /&gt;&lt;br /&gt;Rr =&lt;br /&gt;&lt;br /&gt;  328.1517&lt;br /&gt;&lt;br /&gt;fr =&lt;br /&gt;&lt;br /&gt;  2.7252e-007&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;&lt;br /&gt;  2.3250e-004&lt;br /&gt;&lt;br /&gt;test =&lt;br /&gt;&lt;br /&gt; -1.3268e-013&lt;br /&gt;&lt;br /&gt;Ru =&lt;br /&gt;&lt;br /&gt;  328.1517&lt;br /&gt;&lt;br /&gt;Rrold =&lt;br /&gt;&lt;br /&gt;  328.151&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ru =&lt;br /&gt;&lt;br /&gt;  328.1515&lt;br /&gt;&lt;br /&gt;The value of resistance is:&lt;br /&gt;&lt;br /&gt;  328.1515&lt;br /&gt;&lt;br /&gt;The value of i is:&lt;br /&gt;&lt;br /&gt;    19&lt;br /&gt;&lt;br /&gt;elapsed_time =&lt;br /&gt;&lt;br /&gt;    0.1410&lt;br /&gt;&lt;br /&gt;&gt;&gt;&lt;/p&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border=&quot;5&quot; style=&quot;color:Navy &quot;&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;th style=&quot;color:DarkSlateGray  &quot;&gt;&lt;br /&gt;&lt;p&gt;&lt;h style=&quot;font-size:20px;color:Blue &quot;&gt;Disadvantages:&lt;/h&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;• It is relatively slow when compared with other root finding methods we will study,&lt;br /&gt;      especially when the function f (x) has several continuous derivatives about the root &lt;br /&gt;&lt;br /&gt;x&lt;sub&gt;r&lt;/sub&gt;.&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;• The algorithm has no check to see whether the e is too small for the computer&lt;br /&gt;      arithmetic being used. [This is easily fixed by reference to the machine epsilon of the&lt;br /&gt;      computer arithmetic.]&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;• When we do this method by software (matlab) then need more time of execution for this method &lt;br /&gt;&lt;br /&gt;because this method takes more number of iteration (i).&lt;/li&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;li&gt;• It cannot be used to &lt;br /&gt;&lt;br /&gt;find roots when the function is tangent is the axis and does not pass through the axis.&lt;br /&gt;      For example: f(x) = x&lt;sub&gt;2&lt;/sub&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;/th&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table br=&quot;color:red&quot; border=&quot;5&quot; style=&quot;color:Navy &quot;&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;th style=&quot;color:DarkSlateGray  &quot;&gt;&lt;h style=&quot;font-size:20px;color:Blue &quot;&gt;Discussion:&lt;/h&gt;&lt;br /&gt;&lt;p&gt;In this experiment we learn the MATLAB code of bi-section method for finding root by numerical &lt;br /&gt;&lt;br /&gt;method. We also clarify the basic theory of bi-section method. In MATLAB code we use a user define &lt;br /&gt;&lt;br /&gt;function named RLC so we learn the rule to define a ‘user defined function’ in MATLAB. Finally we &lt;br /&gt;&lt;br /&gt;can say that we properly follow our teacher instruction that’s why we do not face any problem to &lt;br /&gt;&lt;br /&gt;solve our problem.&lt;/p&gt;  &lt;/th&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/5577236938244801024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/bisection-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/5577236938244801024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/5577236938244801024'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/bisection-method.html' title='Bisection Method'/><author><name>sadi</name><uri>http://www.blogger.com/profile/10436437856258370554</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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-7672067785672616252</id><published>2009-07-23T05:33:00.000-07:00</published><updated>2009-07-23T08:32:21.476-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Numerical Analysis Lab."/><title type='text'>Finding root of an equation using Newton-Rapshon Method</title><content type='html'>Newton-Raphson Method, the most widely used of all root-locating formulas. If the function, f(x)&lt;br /&gt;and an initial guess, xi is known then we can easily draw a tangent at the point [x&lt;sub&gt;i&lt;/sub&gt;, f(x&lt;sub&gt;i&lt;/sub&gt;)]. The&lt;br /&gt;&lt;br /&gt;point where the tangent crosses the x-axis usually represents an improved estimate of the root.&lt;br /&gt;&lt;br /&gt;The formula is derived geometrically from the straight line equation as the first derivative of the&lt;br /&gt;function f(x) represents the slop of the tangent at that particular point.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#cc0000;&quot;&gt;A simple algorithm for the Newton-Raphson Method is given below:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;1. Choose an initial guess that will be close to the true root.&lt;br /&gt;&lt;br /&gt;2. An estimate of the root(ε&lt;sub&gt;s&lt;/sub&gt;) is determined by&lt;br /&gt;x&lt;sub&gt;i+1&lt;/sub&gt;=x&lt;sub&gt;i&lt;/sub&gt; - f(x&lt;sub&gt;i&lt;/sub&gt;)/f’(x&lt;sub&gt;i&lt;/sub&gt;);&lt;br /&gt;3. Evaluate the approximate percentage of errors(ε&lt;sub&gt;a&lt;/sub&gt;) by using the following formula:&lt;br /&gt;ε&lt;sub&gt;a&lt;/sub&gt;= ((x&lt;sub&gt;i+1&lt;/sub&gt;- x&lt;sub&gt;i&lt;/sub&gt;)/ (x&lt;sub&gt;i+1&lt;/sub&gt;))*100%&lt;br /&gt;If ε&lt;sub&gt;a&lt;/sub&gt; &lt; ε&lt;sub&gt;s&lt;/sub&gt;, specified error tolerance, then stop the iteration; otherwise go to step 2. The process&lt;br /&gt;is repeated until this condition is met.&lt;br /&gt;&lt;br /&gt;In this experiment we will see how MATLAB can assist us in finding the roots of various functions using the numerical techniques Newton-Raphson method.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;An experimental Circuit for the Newton raphson Method:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The circuit in Figure:1 charges the capacitor from the DC source when the switch is in its rest position.At t=0 sec,the is thrown at &quot;2&quot; position and the capacitor starts to discharge the RLC series circuit.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK1HeOtu-ZeEbExrmib_V1L2Fi7Kap8Eg7CMLr7oOpwp5OcDD8cTxhyqmHGieY1vmx36lMKBKaDddOQR2U8wPYFTGwThTIo5PvzE9l8HIvckKY1g7VxrTmxZO-jpE8db02rn4yG1wV6Lo/s1600-h/ckt1.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5361636797259861874&quot; style=&quot;WIDTH: 411px; CURSOR: hand; HEIGHT: 199px&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK1HeOtu-ZeEbExrmib_V1L2Fi7Kap8Eg7CMLr7oOpwp5OcDD8cTxhyqmHGieY1vmx36lMKBKaDddOQR2U8wPYFTGwThTIo5PvzE9l8HIvckKY1g7VxrTmxZO-jpE8db02rn4yG1wV6Lo/s400/ckt1.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Figure1:An RLC circuit to charge and dischage a capacitor&lt;br /&gt;&lt;br /&gt;The function is given as follows:&lt;br /&gt;f(R)=e&lt;sup&gt;-Rt/2L&lt;/sup&gt;cos[√&lt;span style=&quot;TEXT-DECORATION: overline&quot;&gt; (&lt;i&gt;1/LC&lt;/i&gt;+ &lt;i&gt;(R/2L)&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/span&gt;t]-q/q0&lt;br /&gt;In this section,we have to calculate the resistance in MATLAB using Newton-Raphson Method&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#ff9900;&quot;&gt;MATLAB Files:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;br /&gt;Name this function file as the RLC.m&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;mycode&quot;&gt;&lt;br /&gt;function f_value=RLC(R);&lt;br /&gt;t=0.05;&lt;br /&gt;q0=5e-4;&lt;br /&gt;q=5e-6;&lt;br /&gt;L=5;&lt;br /&gt;C=1e-4;&lt;br /&gt;f_value=(exp(-R*t/(2*L)))*cos(sqrt((1/(L*C))-(R/(2*L))^2)*t)-q/q0;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;&lt;em&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;Code derivative function of the given equation:&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;div class=&quot;mycode&quot;&gt;function f_valueD=RLC_D(R);&lt;br /&gt;f_valueD=(R*t)/((4*L^2)*(sqrt(1/(L*C)-(R/(2*L))^2)))*(exp(-R*t/(2*L)))*sin(sqrt((1/(L*C))-(R/(2*L))^2)*t)-(t/(2*L))*(exp(-R*t/(2*L)))*cos(sqrt((1/(L*C))-(R/(2*L))^2)*t);&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;%code for Newton-Raphson(Main File):&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;/div&gt;&lt;div class=&quot;mycode&quot;&gt;clc;&lt;br /&gt;clear all&lt;br /&gt;tic&lt;br /&gt;Ri=200;&lt;br /&gt;es=0.0001;&lt;br /&gt;j=0;&lt;br /&gt;jmax=25;&lt;br /&gt;while(1)&lt;br /&gt;fi=RLC(Ri)&lt;br /&gt;fid=RLC_D(Ri)&lt;br /&gt;Ril=Ri-fi/fid&lt;br /&gt;if Ril~=0&lt;br /&gt;ea=abs((Ril-Ri)/Ril)*100&lt;br /&gt;end&lt;br /&gt;if ea&lt;esj&gt;=jmax&lt;br /&gt;break&lt;br /&gt;end&lt;br /&gt;fp=fopen(&#39;iea.txt&#39;, &#39;a+&#39;);&lt;br /&gt;[err, msg]=ferror(fp, &#39;clear&#39;);&lt;br /&gt;if err~=0&lt;br /&gt;disp(&#39;An error occurred while appending data to the file&#39;)&#39;&lt;br /&gt;disp(msg)&lt;br /&gt;end&lt;br /&gt;fprintf(fp, &#39;%0.0f\t %8.5e\n&#39;,j,ea);&lt;br /&gt;err=fclose(fp);&lt;br /&gt;if err~=0&lt;br /&gt;disp(&#39;could not close the file&#39;)&lt;br /&gt;end&lt;br /&gt;Ri=Ril&lt;br /&gt;j=j+1&lt;br /&gt;end&lt;br /&gt;disp(&#39;The value of resistance is: &#39;)&lt;br /&gt;disp(Ril)&lt;br /&gt;disp(&#39;The value of j is: &#39;)&lt;br /&gt;disp(j)&lt;br /&gt;toc&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Output:&lt;br /&gt;&lt;div class=&quot;mycode&quot;&gt;fi =&lt;br /&gt;-0.1631&lt;br /&gt;fid =&lt;br /&gt;0.0016&lt;br /&gt;Ril =&lt;br /&gt;301.8218&lt;br /&gt;ea =&lt;br /&gt;33.7357&lt;br /&gt;Ri =&lt;br /&gt;301.8218&lt;br /&gt;j =&lt;br /&gt;1&lt;br /&gt;fi =&lt;br /&gt;-0.0275&lt;br /&gt;fid =&lt;br /&gt;0.0011&lt;br /&gt;Ril =&lt;br /&gt;326.9259&lt;br /&gt;ea =&lt;br /&gt;7.6788&lt;br /&gt;Ri =&lt;br /&gt;326.9259&lt;br /&gt;j =&lt;br /&gt;2&lt;br /&gt;&lt;br /&gt;fi =&lt;br /&gt;-0.0012&lt;br /&gt;fid =&lt;br /&gt;9.9975e-004&lt;br /&gt;Ril =&lt;br /&gt;328.1487&lt;br /&gt;&lt;br /&gt;ea =&lt;br /&gt;0.3726&lt;br /&gt;Ri =&lt;br /&gt;328.1487&lt;br /&gt;j =&lt;br /&gt;3&lt;br /&gt;fi =&lt;br /&gt;-2.6963e-006&lt;br /&gt;fid =&lt;br /&gt;9.9534e-004&lt;br /&gt;Ril =&lt;br /&gt;328.1514&lt;br /&gt;ea =&lt;br /&gt;8.2550e-004&lt;br /&gt;Ri =&lt;br /&gt;328.1514&lt;br /&gt;j =&lt;br /&gt;4&lt;br /&gt;fi =&lt;br /&gt;-1.3185e-011&lt;br /&gt;fid =&lt;br /&gt;9.9533e-004&lt;br /&gt;Ril =&lt;br /&gt;328.1514&lt;br /&gt;ea =&lt;br /&gt;4.0369e-009&lt;br /&gt;The value of resistance is:&lt;br /&gt;328.1514&lt;br /&gt;The value of j is:&lt;br /&gt;4&lt;br /&gt;elapsed_time =&lt;br /&gt;0.0940&lt;/div&gt;&lt;br /&gt;&lt;em&gt;&lt;br /&gt;&lt;strong&gt;Result:&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;The value of resistance, R is = 328.1514&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;Conclusion:&lt;/strong&gt;&lt;br /&gt;We have already studied two methods those are close methods, i.e. they need two initial guesses. In this experiment, we study another method that is open method, i.e. it needs one initial guess. Here we learn the Newton-Raphson Method very clearly and clarify the process of writing the MATLAB code.</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/7672067785672616252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/finding-root-of-using-newtons-rapshon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/7672067785672616252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/7672067785672616252'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/finding-root-of-using-newtons-rapshon.html' title='Finding root of an equation using Newton-Rapshon Method'/><author><name>Unknown</name><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/AVvXsEgK1HeOtu-ZeEbExrmib_V1L2Fi7Kap8Eg7CMLr7oOpwp5OcDD8cTxhyqmHGieY1vmx36lMKBKaDddOQR2U8wPYFTGwThTIo5PvzE9l8HIvckKY1g7VxrTmxZO-jpE8db02rn4yG1wV6Lo/s72-c/ckt1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-1451551512336917330</id><published>2009-07-23T03:53:00.000-07:00</published><updated>2009-07-23T04:39:41.969-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microprocessors And Interfacing lab"/><title type='text'>Download Link.exe(free)</title><content type='html'>In Microprocessors And Interfacing lab. we need a file called link.exe.This will help you to create a link to .obj.So download this file for free. DOWNLOAD LINK:&lt;br /&gt;&lt;a class=&quot;normal12blue&quot; href=&quot;http://www.ziddu.com/download/5737381/Link.exe.html&quot; target=&quot;blank&quot;&gt;Download LINK.exe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;How it works:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Run the file LINK.EXE with your created object file name after it&lt;br /&gt;LINK.EXE EXP1.OBJ or&lt;br /&gt;LINK EXP1&lt;br /&gt;You will see:&lt;br /&gt;&lt;div class=&quot;mycode&quot;&gt;&lt;br /&gt;c:\mda&gt;link exp1&lt;br /&gt;Microsoft (R) Overlay Linker Version 3.60&lt;br /&gt;Microsoft Corp 1983‐1987. All rights reserved.&lt;br /&gt;Run File [exp1.EXE]: &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/1451551512336917330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/download-linkexefree.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/1451551512336917330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/1451551512336917330'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/download-linkexefree.html' title='Download Link.exe(free)'/><author><name>Unknown</name><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-6056275293471531743</id><published>2009-07-23T03:44:00.000-07:00</published><updated>2009-07-23T04:34:48.282-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microprocessors And Interfacing lab"/><title type='text'>Download masm.exe(free)</title><content type='html'>In Microprocessors And Interfacing lab. we need a file called &lt;span style=&quot;color:#ff0000;&quot;&gt;masm.exe&lt;/span&gt;.This will help you to complie the file that you have written already in .asm.Also tell you that if any errors happened in .asm.So download this file for free.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;DOWNLOAD LINK:&lt;/span&gt; &lt;a class=&quot;normal12blue&quot; href=&quot;http://www.ziddu.com/download/5737380/masm.exe.html&quot; target=&quot;blank&quot;&gt;Download masm.exe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;How it works:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Run the file MASM.EXE with your asm file name after it&lt;br /&gt;MASM.EXE EXP1.ASM or&lt;br /&gt;MASM EXP1&lt;br /&gt;&lt;br /&gt;You will see &lt;div class=&quot;mycode&quot;&gt;&lt;br /&gt;C:\mda&gt;masm exp1&lt;br /&gt;Microsoft (R) Macro Assembler Version 5.10&lt;br /&gt;Copyright (C) Microsoft Corp 1981, 1988. All rights reserved.&lt;br /&gt;filename [exp1.OBJ]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Press enter to create exp1.OBJ file then&lt;br /&gt;Source listing [NUL.LST]: Press enter if list file is not needed&lt;br /&gt;Press any name and enter if list file is needed</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/6056275293471531743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/download-masmexefree.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/6056275293471531743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/6056275293471531743'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/download-masmexefree.html' title='Download masm.exe(free)'/><author><name>Unknown</name><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><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-8017209098874425696</id><published>2009-07-17T05:45:00.000-07:00</published><updated>2009-07-17T05:52:02.920-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Digital Signal Processing Lab."/><title type='text'>cross-correlation of two discrete sequence using conv in matlab</title><content type='html'>First we will find convolution of two discrete signals and then crosscorrelation of two signals using conv and xcorr function.&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;MATLAB Code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; clc;&lt;br /&gt;a=[2 3 1];&lt;br /&gt;b=[1 2 3];&lt;br /&gt;c=conv(a,b);&lt;br /&gt;m=length(c)-1;&lt;br /&gt;n=0:1:m;&lt;br /&gt;subplot(3,1,1);&lt;br /&gt;stem(n,c);                                                        &lt;br /&gt;xlabel(&#39;n&#39;);&lt;br /&gt;ylabel(&#39;c&#39;);&lt;br /&gt;title(&#39;convolution of two discrete sequence using conv function&#39;);&lt;br /&gt;x=[1 2 3];&lt;br /&gt;y=[1 2 3];&lt;br /&gt;n1=length(y)-1;&lt;br /&gt;n2=length(x)-1;&lt;br /&gt;r1=conv(x,fliplr(y));&lt;br /&gt;r=xcorr(x,y);&lt;br /&gt;k=-n1:n2;&lt;br /&gt;subplot(3,1,2);&lt;br /&gt;stem(k,r);&lt;br /&gt;xlabel(&#39;k&#39;);&lt;br /&gt;ylabel(&#39;r&#39;);&lt;br /&gt;title(&#39;cross-correlation of two discrete sequence using conv and xcorr function&#39;);&lt;br /&gt;subplot(3,1,3);&lt;br /&gt;stem(k,r1);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;Output:&lt;br /&gt;&lt;/span&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZIGEmdosQRyo1obZXHTF3yCU8Qo6y6aIqw8BYlhz4filk-3rH1mi4-Ok0P5KP0oz5IBtFw9J5EQwyfDFXm9iPrT4R_UT02oodJhX8zl7GRqzEtEwuC4qaD-njwDstij_k18X0Ei6sb-s/s1600-h/ch111.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5359409729507338946&quot; style=&quot;WIDTH: 400px; CURSOR: hand; HEIGHT: 274px&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZIGEmdosQRyo1obZXHTF3yCU8Qo6y6aIqw8BYlhz4filk-3rH1mi4-Ok0P5KP0oz5IBtFw9J5EQwyfDFXm9iPrT4R_UT02oodJhX8zl7GRqzEtEwuC4qaD-njwDstij_k18X0Ei6sb-s/s400/ch111.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/8017209098874425696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/cross-correlation-of-two-discrete.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/8017209098874425696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/8017209098874425696'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/cross-correlation-of-two-discrete.html' title='cross-correlation of two discrete sequence using conv in matlab'/><author><name>Unknown</name><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/AVvXsEiZIGEmdosQRyo1obZXHTF3yCU8Qo6y6aIqw8BYlhz4filk-3rH1mi4-Ok0P5KP0oz5IBtFw9J5EQwyfDFXm9iPrT4R_UT02oodJhX8zl7GRqzEtEwuC4qaD-njwDstij_k18X0Ei6sb-s/s72-c/ch111.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-2897415271085010791</id><published>2009-07-17T05:23:00.000-07:00</published><updated>2009-07-17T05:36:35.874-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Digital Signal Processing Lab."/><title type='text'>Checking Linearity of given signal</title><content type='html'>&lt;span style=&quot;color:#009900;&quot;&gt; Checking Linearity of given signal,y(n)=nx(n)&lt;/span&gt; &lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;Matlab Code&lt;/span&gt;&lt;br /&gt;clc;&lt;br /&gt;n=0:10;&lt;br /&gt;a=2;&lt;br /&gt;b=-3;&lt;br /&gt;x1=cos(2*pi*.1*n);&lt;br /&gt;x2=cos(2*pi*.5*n);&lt;br /&gt;x=a.*x1+b.*x2;&lt;br /&gt;y=n.*x;&lt;br /&gt;y1=n.*x1;&lt;br /&gt;y2=n.*x2;&lt;br /&gt;yt=a.*y1+b.*y2;&lt;br /&gt;d=y-yt;&lt;br /&gt;subplot(3,1,1);&lt;br /&gt;stem(n,y);&lt;br /&gt;subplot(3,1,2);&lt;br /&gt;stem(n,yt);&lt;br /&gt;subplot(3,1,3);&lt;br /&gt;stem(n,d);&lt;br /&gt;axis([0 40 -10 20]);&lt;/div&gt;&lt;div&gt;Output:&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJqwnBPMm6X0AR7WZ41O52YzWkXVnFTlqMoQAVyLdh8sbBaM3IRQwbM23pi85UpMcnIWd3aWC7rTwOTScRgqX0GbZbVj23YWXvASbPUhKFzzQX202CoN9UFqZnu6oEXNksGWErxmVonNE/s1600-h/chl1.gif&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5359405201289949890&quot; style=&quot;WIDTH: 400px; CURSOR: hand; HEIGHT: 271px&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJqwnBPMm6X0AR7WZ41O52YzWkXVnFTlqMoQAVyLdh8sbBaM3IRQwbM23pi85UpMcnIWd3aWC7rTwOTScRgqX0GbZbVj23YWXvASbPUhKFzzQX202CoN9UFqZnu6oEXNksGWErxmVonNE/s400/chl1.gif&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;Conclusion&lt;/span&gt;:A linear system is one that satisfies the superposition principles. Simply stated, the principle of superposition requires that the responses of the systems to a weighted sum of signal be equal to the corresponding weighted sum of the responses (outputs) of the systems to each of the individual input signals. Hence we have the following definition of linearity.&lt;span style=&quot;color:#cc6600;&quot;&gt;Here from the figure1 we first plotted the linear combination of input and then plotted the linear combination of output and then plotted the difference.The difference between them is  zero or equal.So the system is linear. &lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/2897415271085010791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/checking-linearity-of-given-signal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/2897415271085010791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/2897415271085010791'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/checking-linearity-of-given-signal.html' title='Checking Linearity of given signal'/><author><name>Unknown</name><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/AVvXsEiJqwnBPMm6X0AR7WZ41O52YzWkXVnFTlqMoQAVyLdh8sbBaM3IRQwbM23pi85UpMcnIWd3aWC7rTwOTScRgqX0GbZbVj23YWXvASbPUhKFzzQX202CoN9UFqZnu6oEXNksGWErxmVonNE/s72-c/chl1.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-6480811551270489349</id><published>2009-07-17T05:04:00.000-07:00</published><updated>2009-07-17T05:20:57.745-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Digital Signal Processing Lab."/><title type='text'>discreting an analog signal at different sampling rate</title><content type='html'>&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;MATLAB Code:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;f=10;&lt;br /&gt;dt=.00005;&lt;br /&gt;t=-.25:dt:.25;&lt;br /&gt;xa=3*cos(2*pi*f*t);&lt;br /&gt;subplot(5,1,1);&lt;br /&gt;plot(t,xa); %plotting analog signal&lt;br /&gt;xlabel(&#39;Time&#39;);&lt;br /&gt;ylabel(&#39;Analog xa&#39;);&lt;br /&gt;title(&#39;continuous time signal&#39;);&lt;br /&gt;Ts=0.001; %sampling time .001&lt;br /&gt;n=0:Ts:1;&lt;br /&gt;xd=3*cos(2*pi*f*n);&lt;br /&gt;k=0:(length(n)-1);&lt;br /&gt;subplot(5,1,2);&lt;br /&gt;stem(k,xd);&lt;br /&gt;Ts=0.003; %sampling time .003&lt;br /&gt;n=0:Ts:1;&lt;br /&gt;xd=3*cos(2*pi*f*n);&lt;br /&gt;k=0:(length(n)-1);&lt;br /&gt;subplot(5,1,3);&lt;br /&gt;stem(k,xd);&lt;br /&gt;Ts=0.004; %sampling time .004&lt;br /&gt;n=0:Ts:1;&lt;br /&gt;xd=3*cos(2*pi*f*n);&lt;br /&gt;k=0:(length(n)-1);&lt;br /&gt;subplot(5,1,4);&lt;br /&gt;stem(k,xd);&lt;br /&gt;Ts=0.05; %sampling time .05&lt;br /&gt;n=0:Ts:1;&lt;br /&gt;xd=3*cos(2*pi*f*n);&lt;br /&gt;k=0:(length(n)-1);&lt;br /&gt;subplot(5,1,5);&lt;br /&gt;stem(k,xd); &lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;Output:&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNrffKyIHP0WZbxTua4XNQ2Jl-VShfQB3yoonzDZnWfX4PdqGyALRldpKaoioPHzkzuAo52ooLx4epBJEHvP5AbKw1PQOi0rr9n7Okn9_xTLQFOYuncBYpDo11Z8G79Xu7Rdy2jmzjTRY/s1600-h/dddd.jpeg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5359402631970260370&quot; style=&quot;WIDTH: 498px; CURSOR: hand; HEIGHT: 508px&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNrffKyIHP0WZbxTua4XNQ2Jl-VShfQB3yoonzDZnWfX4PdqGyALRldpKaoioPHzkzuAo52ooLx4epBJEHvP5AbKw1PQOi0rr9n7Okn9_xTLQFOYuncBYpDo11Z8G79Xu7Rdy2jmzjTRY/s320/dddd.jpeg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;&lt;/span&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/6480811551270489349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/discreting-analog-signal-at-different.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/6480811551270489349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/6480811551270489349'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/discreting-analog-signal-at-different.html' title='discreting an analog signal at different sampling rate'/><author><name>Unknown</name><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/AVvXsEjNrffKyIHP0WZbxTua4XNQ2Jl-VShfQB3yoonzDZnWfX4PdqGyALRldpKaoioPHzkzuAo52ooLx4epBJEHvP5AbKw1PQOi0rr9n7Okn9_xTLQFOYuncBYpDo11Z8G79Xu7Rdy2jmzjTRY/s72-c/dddd.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-5147694157610595857</id><published>2009-07-16T05:39:00.000-07:00</published><updated>2009-07-16T23:34:38.492-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Digital Signal Processing Lab."/><title type='text'>checking linear or nonlinear system in MATLAB</title><content type='html'>The input and output relation of a given system &lt;span style=&quot;color:#ff0000;&quot;&gt;y(n)=Ax(n)+B&lt;/span&gt;, where y(n) is the output and x(n) is the input. We have to check if the system is linear or nonlinear.&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;MATLAB Code:&lt;/span&gt;&lt;br /&gt;clc;&lt;br /&gt;n=0:40;&lt;br /&gt;a=2;&lt;br /&gt;b=-3;&lt;br /&gt;A=5;&lt;br /&gt;B=6;&lt;br /&gt;x1=cos(2*pi*.1*n);&lt;br /&gt;x2=cos(2*pi*.5*n);&lt;br /&gt;y=A.*(a.*x1+b.*x2)+B;&lt;br /&gt;subplot(3,1,1);&lt;br /&gt;stem(n,y);&lt;br /&gt;yt=A.*(a.*x1+b.*x2)+a.*B+b.*B;&lt;br /&gt;subplot(3,1,2);&lt;br /&gt;stem(n,yt);&lt;br /&gt;d=y-yt;&lt;br /&gt;subplot(3,1,3);&lt;br /&gt;stem(n,d);&lt;br /&gt;axis([0 40 -10 20]);&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;Output:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTdt861wIgcZnO382PQdYycvr7UVviRL9lTfiVT3ADr8Sb6TwZWhFn1J6Wtrq4QZ2tgckVwo0dO_JPTr-JfcLj-nyuPzugCcgPbUiyPFeFJzOyBWZNtZI7KDKTcmIOJzVO82OLovzVAuE/s1600-h/nonlinear.jpeg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5359310472854016642&quot; style=&quot;WIDTH: 467px; CURSOR: hand; HEIGHT: 619px&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTdt861wIgcZnO382PQdYycvr7UVviRL9lTfiVT3ADr8Sb6TwZWhFn1J6Wtrq4QZ2tgckVwo0dO_JPTr-JfcLj-nyuPzugCcgPbUiyPFeFJzOyBWZNtZI7KDKTcmIOJzVO82OLovzVAuE/s400/nonlinear.jpeg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div align=&quot;left&quot;&gt;Figure:1&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff0000;&quot;&gt;Conclusion&lt;/span&gt;:A linear system is one that satisfies the superposition principles. Simply stated, the principle of superposition requires that the responses of the systems to a weighted sum of signal be equal to the corresponding weighted sum of the responses (outputs) of the systems to each of the individual input signals. Hence we have the following definition of linearity.&lt;br /&gt;&lt;span style=&quot;color:#cc66cc;&quot;&gt;Here from the figure1 we first plotted the linear combination of input and then plotted the linear combination of output and then plotted the difference.The difference between them is not zero or not equal.So the system is nonlinear&lt;/span&gt;.</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/5147694157610595857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/checking-linear-or-nonlinear-system-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/5147694157610595857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/5147694157610595857'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/checking-linear-or-nonlinear-system-in.html' title='checking linear or nonlinear system in MATLAB'/><author><name>Unknown</name><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/AVvXsEgTdt861wIgcZnO382PQdYycvr7UVviRL9lTfiVT3ADr8Sb6TwZWhFn1J6Wtrq4QZ2tgckVwo0dO_JPTr-JfcLj-nyuPzugCcgPbUiyPFeFJzOyBWZNtZI7KDKTcmIOJzVO82OLovzVAuE/s72-c/nonlinear.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-6885419733917830479</id><published>2009-07-16T03:04:00.000-07:00</published><updated>2009-07-16T05:33:20.683-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Numerical Analysis"/><title type='text'>Advantages and Disadvanteges of Secant Method</title><content type='html'>&lt;p&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;Advantages of secant method&lt;/span&gt;: &lt;/p&gt;&lt;p&gt;1. It converges at faster than a linear rate, so that it is more rapidly&lt;br /&gt;convergent than the bisection method.&lt;br /&gt;2. It does not require use of the derivative of the&lt;br /&gt;function, something that is not available in a number&lt;br /&gt;of applications.&lt;br /&gt;3. It requires only one function evaluation per iteration,&lt;br /&gt;as compared with Newton’s method which requires&lt;br /&gt;two.&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;Disadvantages of secant method:&lt;/span&gt;&lt;br /&gt;1. It may not converge.&lt;br /&gt;2. There is no guaranteed error bound for the computed&lt;br /&gt;iterates.&lt;br /&gt;3. It is likely to have difficulty if f 0(α) = 0. This&lt;br /&gt;means the x-axis is tangent to the graph of y = f (x)&lt;br /&gt;at x = α.&lt;br /&gt;4. Newton’s method generalizes more easily to new&lt;br /&gt;methods for solving simultaneous systems of nonlinear&lt;br /&gt;equations.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/6885419733917830479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/advantages-and-disadvanteges-of-secant.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/6885419733917830479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/6885419733917830479'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/advantages-and-disadvanteges-of-secant.html' title='Advantages and Disadvanteges of Secant Method'/><author><name>Unknown</name><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><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-1008301369642362612</id><published>2009-07-15T07:15:00.000-07:00</published><updated>2009-07-15T07:35:07.800-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Digital Signal Processing Lab."/><title type='text'>Unit impulse using MATLAB</title><content type='html'>MATLAB Code:&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnznWDZmKijZAx_vB301qHnfzR_Na-ptkTwq6j64GEkMORPIJpRzO98B8EsgEuQg_K4lczrKvbyi1vSo0lA2ZL3FerXi5BueDdme4jjpThYjZgloo-jJha39QqJsD1gMmSwwStjP_15Us/s1600-h/advanced+unit+step.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5358694261523435522&quot; style=&quot;FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 307px; CURSOR: hand; HEIGHT: 229px&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnznWDZmKijZAx_vB301qHnfzR_Na-ptkTwq6j64GEkMORPIJpRzO98B8EsgEuQg_K4lczrKvbyi1vSo0lA2ZL3FerXi5BueDdme4jjpThYjZgloo-jJha39QqJsD1gMmSwwStjP_15Us/s400/advanced+unit+step.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;%unit impulse&lt;br /&gt;n=-10:20 ;&lt;br /&gt;us=[zeros(1,10) ones(1,21)];&lt;br /&gt;subplot(3,1,1);&lt;br /&gt;stem(n,us);&lt;br /&gt;title(&#39;unit step&#39;)&lt;br /&gt;axis([-10 20 0 1.2]);&lt;br /&gt;delayed unit step &lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;MATLAB Code:&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2fwkTdE8AcWphjSFQeaATWs_pCYAzBFwpIUBSZJacUtd5cQsyCRl3s7yLO-Bt7xiT8aqOVyHyr7etrzm41A5vw7oCs9vjNxGW7xCxuW5TUNhZg-8z8IJqVRo6_WdFzhGqouXP1KyGJg/s1600-h/delayed+unit+step.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5358694268573624962&quot; style=&quot;FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 296px; CURSOR: hand; HEIGHT: 237px&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN2fwkTdE8AcWphjSFQeaATWs_pCYAzBFwpIUBSZJacUtd5cQsyCRl3s7yLO-Bt7xiT8aqOVyHyr7etrzm41A5vw7oCs9vjNxGW7xCxuW5TUNhZg-8z8IJqVRo6_WdFzhGqouXP1KyGJg/s400/delayed+unit+step.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;%delayed unit impulse&lt;br /&gt;n=-10:20;&lt;br /&gt;usd=[zeros(1,15) ones(1,16)];&lt;br /&gt;subplot(3,1,2);&lt;br /&gt;stem(n,usd);&lt;br /&gt;title(&#39;delayed unit step&#39;)&lt;br /&gt;axis([-10 20 0 1.2]);&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;MATLAB Code: &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5ww9FXnMc67A3fqez7nX33f55FNJCzDarGvRCcXBdpdfsOfMxluphRDvkhMfLSlTbMR42egDCRcSyPBPC6pqejMCaECx75jfcAtYKza_5Q4Czfh4H4ZK1FCOgF1aum_XgZ2OKPpzB3e0/s1600-h/unitstep.JPG&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5358694273317219954&quot; style=&quot;FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 308px; CURSOR: hand; HEIGHT: 257px&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5ww9FXnMc67A3fqez7nX33f55FNJCzDarGvRCcXBdpdfsOfMxluphRDvkhMfLSlTbMR42egDCRcSyPBPC6pqejMCaECx75jfcAtYKza_5Q4Czfh4H4ZK1FCOgF1aum_XgZ2OKPpzB3e0/s400/unitstep.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;%advanced unit step&lt;br /&gt;n=-10:20 ;&lt;br /&gt;usa=[zeros(1,3) ones(1,28)];&lt;br /&gt;subplot(3,1,3);&lt;br /&gt;stem(n,usa);&lt;br /&gt;title(&#39;advanced unit step &#39;)axis([-10 20 0 1.2]);&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/1008301369642362612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/unit-impulse-using-matlab.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/1008301369642362612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/1008301369642362612'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/unit-impulse-using-matlab.html' title='Unit impulse using MATLAB'/><author><name>Unknown</name><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/AVvXsEhnznWDZmKijZAx_vB301qHnfzR_Na-ptkTwq6j64GEkMORPIJpRzO98B8EsgEuQg_K4lczrKvbyi1vSo0lA2ZL3FerXi5BueDdme4jjpThYjZgloo-jJha39QqJsD1gMmSwwStjP_15Us/s72-c/advanced+unit+step.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5684790982742506385.post-601672780797541343</id><published>2009-07-15T03:43:00.000-07:00</published><updated>2009-07-15T07:40:14.076-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Digital Signal Processing Lab."/><title type='text'>Unit step using MATLAB</title><content type='html'>&lt;span style=&quot;color:#333333;&quot;&gt;In this section we will be learned how to implement unit step in MATLAB. &lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;MATLAB code:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;%unit impulse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;n=-10:20&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;us=[zeros(1,10) 1 zeros(1,20)];&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;subplot(3,1,1);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;stem(n,us);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;title(&#39;unit impulse&#39;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;%delayed unit impulse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;usd=[zeros(1,15) 1 zeros(1,15)];&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;subplot(3,1,2);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;stem(n,usd);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;title(&#39;delayed unit impulse&#39;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;%advanced unit impulse&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;usa=[zeros(1,3) 1 zeros(1,27)];&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;subplot(3,1,3);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;stem(n,usa);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;title(&#39;advanced unit impulse&#39;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;axis([-10 20 0 1.2]); %defining axis&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style=&quot;color:#ff6666;&quot;&gt;OUTPUT:&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-DaxtPAOdjm2axVY_a0qzFegIufdlW4VenLsdhZcHQeewnpB9Wd2_JvzyoZ2-KXRvkU8BlP9iu2u46idgd-S7n29F3680c2grSdvNY6VzOfbJhI7tX4b_FOQDUsIu4zukhD_pEZ-HLsw/s1600-h/unit-impulse.jpeg&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij2wo_YGH_F6YZxe-nidwClPYFZrvoWtJb9_VZD7wFkqya5-sim6QPID4cCY8bl_CF_q_7CQXYmdeX5e0xQzPY1-_S1HRViZuwQ5KbHb4H_lzF69MlquHpiz_ZQ-VynESUHEW2RhzpV9Y/s1600-h/unit-impulse.jpeg&quot;&gt;&lt;img id=&quot;BLOGGER_PHOTO_ID_5358639087323978162&quot; style=&quot;WIDTH: 646px; CURSOR: hand; HEIGHT: 435px&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij2wo_YGH_F6YZxe-nidwClPYFZrvoWtJb9_VZD7wFkqya5-sim6QPID4cCY8bl_CF_q_7CQXYmdeX5e0xQzPY1-_S1HRViZuwQ5KbHb4H_lzF69MlquHpiz_ZQ-VynESUHEW2RhzpV9Y/s400/unit-impulse.jpeg&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://studyhelpszone.blogspot.com/feeds/601672780797541343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/unit-impulse-using-matlab-code.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/601672780797541343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5684790982742506385/posts/default/601672780797541343'/><link rel='alternate' type='text/html' href='http://studyhelpszone.blogspot.com/2009/07/unit-impulse-using-matlab-code.html' title='Unit step using MATLAB'/><author><name>Unknown</name><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/AVvXsEij2wo_YGH_F6YZxe-nidwClPYFZrvoWtJb9_VZD7wFkqya5-sim6QPID4cCY8bl_CF_q_7CQXYmdeX5e0xQzPY1-_S1HRViZuwQ5KbHb4H_lzF69MlquHpiz_ZQ-VynESUHEW2RhzpV9Y/s72-c/unit-impulse.jpeg" height="72" width="72"/><thr:total>1</thr:total></entry></feed>