<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Rooting Around in MATLAB &#8211; Part 3</title>
	<atom:link href="http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Thu, 09 Feb 2012 04:19:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/#comment-30414</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 25 Jun 2009 10:43:03 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/#comment-30414</guid>
		<description>Ben-

Yes, you have listed the 3rd way to factor the equation.  Yi Cao mentioned it as well in a comment on the first part of this series.

--Loren</description>
		<content:encoded><![CDATA[<p>Ben-</p>
<p>Yes, you have listed the 3rd way to factor the equation.  Yi Cao mentioned it as well in a comment on the first part of this series.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/#comment-30413</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 25 Jun 2009 00:11:34 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/#comment-30413</guid>
		<description>Loren, as you said there are many ways to write the fixed point equation.  Another interesting way is to run the iterations backwards if possible.  Here we can solve g1inv=@(x) (1-x).^(1/3) which converges for x0 in (0,1).

This technique is also useful for finding unstable fixed points and limit cycles of dynamical systems.</description>
		<content:encoded><![CDATA[<p>Loren, as you said there are many ways to write the fixed point equation.  Another interesting way is to run the iterations backwards if possible.  Here we can solve g1inv=@(x) (1-x).^(1/3) which converges for x0 in (0,1).</p>
<p>This technique is also useful for finding unstable fixed points and limit cycles of dynamical systems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/#comment-30410</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Wed, 24 Jun 2009 10:57:31 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/#comment-30410</guid>
		<description>Matt-

Animations can definitely help.  I was trying to illustrate the steps for teaching purposes.

--loren</description>
		<content:encoded><![CDATA[<p>Matt-</p>
<p>Animations can definitely help.  I was trying to illustrate the steps for teaching purposes.</p>
<p>&#8211;loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt fig</title>
		<link>http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/#comment-30407</link>
		<dc:creator>matt fig</dc:creator>
		<pubDate>Tue, 23 Jun 2009 22:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/06/23/rooting-around-in-matlab-part-3/#comment-30407</guid>
		<description>I often find with these types of things that a simple animation is worth a thousand words.  For instance:


&lt;pre&gt; &lt;code&gt;
g2 = @(x) 1./(x.^2+1);
fplot(g2,[.4 .9]);
hold on
straightLine = @(x) x;
fplot(straightLine, [.4 .9], &#039;g&#039;)
legend(&#039;g2&#039;,&#039;x&#039;,&#039;Location&#039;,&#039;SouthEast&#039;)
grid on
axis equal, axis([.4 .9 .4 .9])


xo = .5; % Initial Guess.
yo = .5;
plot(xo,yo,&#039;*r&#039;,&#039;markersize&#039;,6)
T = title([&#039;Root: &#039;,num2str(yo,&#039;%.6f&#039;)],&#039;fonts&#039;,14,&#039;fontw&#039;,&#039;b&#039;);
pause(.4)

for n = 1:22
    x = yo;
    y = g2(xo);
    plot(x,y,&#039;*r&#039;,&#039;markersize&#039;,5)
    set(T,&#039;string&#039;,[&#039;Root: &#039;,num2str(y,&#039;%.6f&#039;)])
    xo = x;
    yo = y;
    pause(.4)
end

hold off
&lt;/code&gt; &lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>I often find with these types of things that a simple animation is worth a thousand words.  For instance:</p>
<pre> <code>
g2 = @(x) 1./(x.^2+1);
fplot(g2,[.4 .9]);
hold on
straightLine = @(x) x;
fplot(straightLine, [.4 .9], 'g')
legend('g2','x','Location','SouthEast')
grid on
axis equal, axis([.4 .9 .4 .9])

xo = .5; % Initial Guess.
yo = .5;
plot(xo,yo,'*r','markersize',6)
T = title(['Root: ',num2str(yo,'%.6f')],'fonts',14,'fontw','b');
pause(.4)

for n = 1:22
    x = yo;
    y = g2(xo);
    plot(x,y,'*r','markersize',5)
    set(T,'string',['Root: ',num2str(y,'%.6f')])
    xo = x;
    yo = y;
    pause(.4)
end

hold off
</code> </pre>
]]></content:encoded>
	</item>
</channel>
</rss>

