<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Numerical Methods Guy</title>
	
	<link>http://autarkaw.wordpress.com</link>
	<description>Simplifying numerical methods</description>
	<lastBuildDate>Sun, 08 Nov 2009 16:06:56 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain="autarkaw.wordpress.com" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />
<image>
		<url>http://www.gravatar.com/blavatar/73199b80a75e6a5213f57c3508f7dcf8?s=96&amp;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>The Numerical Methods Guy</title>
		<link>http://autarkaw.wordpress.com</link>
	</image>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/wordpress/EDie" type="application/rss+xml" /><feedburner:emailServiceId>wordpress/EDie</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>MATLAB code for bubble sort</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/9RBd9fvkUPs/</link>
		<comments>http://autarkaw.wordpress.com/2009/11/08/matlab-code-for-bubble-sort/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 16:06:11 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[MATLAB programming]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[bubble sort]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=422</guid>
		<description><![CDATA[In the previous blog, we spelled out the bubble sort algorithm for putting an array of numbers in an ascending order.   In this post, I am posting the matlab program. It is better to download the program as single quotes in the pasted version do not translate properly when pasted into a mfile editor of MATLAB [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=422&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In the previous blog, we spelled out the bubble sort algorithm for putting an array of numbers in an ascending order.   In this post, I am posting the matlab program. It is better to <a href="http://numericalmethods.eng.usf.edu/blog/bubble_sort.m"><strong>download</strong></a> the program as single quotes in the pasted version do not translate properly when pasted into a mfile editor of MATLAB or see the <a href="http://numericalmethods.eng.usf.edu/blog/html/bubble_sort.html"><strong>html version </strong></a>for clarity and sample output.</p>
<p>%% PUTTING AN VECTOR OF NUMBERS IN AN ASCENDING ORDER?<br />
% Language : Matlab 2007a<br />
% Authors : Autar Kaw<br />
% Last Revised : November 8, 2009<br />
% Abstract: This program shows you how to put a vector<br />
% of numbers in an ascending order using the bubble sort method<br />
clc<br />
clear all<br />
disp(&#8216;This program shows the bubble sort method&#8217;)<br />
disp(&#8216;to put a vector of numbers in an &#8216;)<br />
disp(&#8216;ascending order&#8217;)<br />
disp(&#8216;Matlab 2007a&#8217;)<br />
disp(&#8216;Authors : Autar Kaw&#8217;)<br />
disp(&#8216;Last Revised : November 8, 2009&#8242;)<br />
disp(&#8216;http://numericalmethods.eng.usf.edu&#8217;)<br />
disp(&#8216;  &#8216;)<br />
%% INPUTS<br />
% The vector of numbers<br />
disp (&#8216;INPUTS&#8217;)<br />
disp(&#8216;Input the vector of numbers&#8217;)<br />
A=[18  7  6  15  4  13];<br />
disp(A)<br />
%% SOLUTION<br />
% Number of entries, n<br />
n=length(A);<br />
% making (n-1) passes<br />
for j=1:1:n-1<br />
    % comparing each number with the next and swapping<br />
    for i=1:1:n-1<br />
    if A(i)&gt;A(i+1);<br />
        % temp is a variable where the numbers are kept<br />
        % temporarily for the switch<br />
        temp=A(i);<br />
        A(i)=A(i+1);<br />
        A(i+1)=temp;<br />
    end<br />
    end<br />
end</p>
<p>%% OUTPUT<br />
disp(&#8216;  &#8216;)<br />
disp (&#8216;OUTPUT&#8217;)<br />
disp (&#8216;The ascending matrix is&#8217;)<br />
disp(A)</p>
<p>_______________________________________________________</p>
<p>This post is brought to you by Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/">http://numericalmethods.eng.usf.edu</a>, the textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html">Numerical Methods with Applications</a> available from the <a href="http://stores.lulu.com/kawautar">lulu storefront</a>, and the YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos">http://numericalmethods.eng.usf.edu/videos</a> and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></p>
<p>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie">reader</a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US">email</a> to stay updated with this blog. Let the information follow you.</p>
Posted in matlab, MATLAB programming Tagged: bubble sort, matlab, vector <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/422/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=422&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/9RBd9fvkUPs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/11/08/matlab-code-for-bubble-sort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/11/08/matlab-code-for-bubble-sort/</feedburner:origLink></item>
		<item>
		<title>Bubble sorting</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/7KXMv6k2eJE/</link>
		<comments>http://autarkaw.wordpress.com/2009/11/03/bubble-sorting/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 01:37:59 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[MATLAB programming]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[bubble sort]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=413</guid>
		<description><![CDATA[Last week, I was teaching how to randomly pick lotto numbers using MATLAB.  The problem was that some of the numbers that were getting picked were identical.  We solved this by using comparisons until the current number picked is different from the previously selected numbers.  We blogged on this a few months ago.  But there [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=413&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last week, I was teaching how to randomly pick lotto numbers using MATLAB.  The problem was that some of the numbers that were getting picked were identical.  We solved this by using comparisons until the current number picked is different from the previously selected numbers.  We <a href="http://autarkaw.wordpress.com/2008/11/10/picking-lotto-numbers/">blogged on this</a> a few months ago.  But there is still an aesthetic problem of how the numbers are presented.  The numbers are not in an ascending or descending order.  This is a good time to show how to do this using the simplest (if not the most efficient) procedure called the bubble sort.</p>
<p>Let&#8217;s suppose someone asks you to put [8 7  9  5   4] in an ascending order.  </p>
<p>Starting from the first number, you compare the number with the next number, and see if it is greater.  If it is, you swap the numbers.  You continue to do this with the second number, third number and so on until the second last number.  What this does is bubble the largest number to the end. </p>
<p>[8  7  9  5  4 ] -&gt; [7  8  9  5  4]  (as 8&gt;7) -&gt; [7  8  9  5  4]  (as 8 is not &gt; 9)-&gt; [7  8  5   9   4]  (as 9 is &gt;5) -&gt; [7  8   5  4  9]  (as 9&gt;4).  See how the largest number is at the end. </p>
<p>Now repeat this.  [7  8   5  4  9]  -&gt; [7  8  5  4  9] (as 7 is not &gt;8] -&gt; [7   5  8  4  9] (as 8&gt;5) -&gt; [7  5  4  8 9]  (as 8&gt;4) -&gt;  [7  5  4  8  9 ] (as 8 is not &gt;9)</p>
<p>Now repeat this.  [ 7  5  4  8  9] -&gt; [5  7  4  8  9] -&gt; [ 5  4  7  8  9] -&gt; [ 5  4  7  8  9]  -&gt; [  5  4  7  8  9]</p>
<p>Now repeat this.  [5  4  7  8  9] -&gt; [ 4  5  7  8  9] -&gt; [ 4  5  7  8 9] -&gt; [ 4  5  7  8   9]  -&gt; [  4 5  7  8  9]</p>
<p>It looks like we are done.  If n is the number of the numbers in the array, it takes (n-1) swaps within each of the (n-1) repetitions.  So we do not have to guess how many swaps it takes or how many repetitions it takes. </p>
<p>To make the bubble sort efficient, we can do the following: 1) Since with each repetition the largest number bubbles up, we may need to do less swaps.  For the first repetition, we will do (n-1) swaps, for the next repetition, we do the first (n-2) swaps, and so on.  2) We can also keep track of number of swaps taking place in a repetition.  If no swaps take place in a repetition, no more repetitions are needed.</p>
<p>_______________________________________________________</p>
<p>This post is brought to you by Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/">http://numericalmethods.eng.usf.edu</a>, the textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html">Numerical Methods with Applications</a> available from the <a href="http://stores.lulu.com/kawautar">lulu storefront</a>, and the YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos">http://numericalmethods.eng.usf.edu/videos</a> and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></p>
<p>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie">reader</a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US">email</a> to stay updated with this blog. Let the information follow you.</p>
Posted in matlab, MATLAB programming Tagged: bubble sort, matlab <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/413/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=413&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/7KXMv6k2eJE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/11/03/bubble-sorting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/11/03/bubble-sorting/</feedburner:origLink></item>
		<item>
		<title>How do I numerically solve an ODE in MATLAB?</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/DKzclSlgjKM/</link>
		<comments>http://autarkaw.wordpress.com/2009/10/20/how-do-i-numerically-solve-an-ode-in-matlab/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 18:42:10 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[MATLAB programming]]></category>
		<category><![CDATA[Numerical Methods]]></category>
		<category><![CDATA[Ordinary Differential Equations]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[ode45]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=402</guid>
		<description><![CDATA[The other day a student came to ask me for help in solving a second order ordinary differential equation using the ode45 routine of MATLAB.  To use ode45, one needs to be familiar with how the inputs are required by MATLAB.  The understanding of these inputs is important to use ode45 successfully in problems that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=402&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The other day a student came to ask me for help in solving a second order ordinary differential equation using the ode45 routine of MATLAB.  To use ode45, one needs to be familiar with how the inputs are required by MATLAB.  The understanding of these inputs is important to use ode45 successfully in problems that are more complex than solving a second order ODE.</p>
<p>The ordinary differential equation was<br />
      2y&#8221;+3y&#8217;+5y=7 exp(-x), y(0)=11, dy/dx(0)=13<br />
This has to put in the state variable form by reducing it by using<br />
      y&#8217;=z<br />
That gives<br />
      y&#8217;=z with the corresponding initial conditions as y(0)=11<br />
Then<br />
      2y&#8221;+3y&#8217;+5y=7 exp(-x)<br />
reduces to<br />
      2z&#8217; + 3z+5y=7exp(-x)<br />
      z&#8217; =(7exp(-x)-3z-5y)/2 with the corresponding initial conditions as z(0)=13</p>
<p>So as needed by MATLAB, call y as y(1) and z as y(2)<br />
       dy(1)=y(2), y(1) at x=0 is 11<br />
       dy(2)=(7exp(-x)-3y(2)-5y(1))/2, y(2) at x=0 is 13</p>
<p>These equations are now put in a MATLAB function we call odestate.m<br />
       <span style="color:#993300;">dy=zeros(2,1);<br />
       dy(1)=y(2);<br />
       dy(2)=(7*exp(-x)-3*y(2)-5*y(1))/2;</span></p>
<p>To solve the ODE, the<br />
The inputs are<br />
1) the function odestate<br />
2) The outputs are required between x=0 and x=17,<br />
     hence entered as [0 17]<br />
3) The initial conditions are y(0)=11 and dy/dx(0)=13,<br />
     hence entered as [11  13]</p>
<p>The outputs are<br />
1) X= array of x values between 0 and 17<br />
2) Y= matrix of 2 columns;<br />
      first column is the y(x)<br />
      second column is dy/dx(x)<br />
The MATLAB code then is<br />
<span style="color:#993300;">[X,Y]=ode45(@odestate,[0  17],[11 13]);</span></p>
<p><span style="color:#993300;">Click the links for the MATLAB mfiles for the function <a href="http://numericalmethods.eng.usf.edu/blog/odestate.m">odestate.m</a> and the ODE solver <a href="http://numericalmethods.eng.usf.edu/blog/odetest.m">odetest.m</a></span></p>
<p><span style="color:#993300;">_________________________________________________________________________________</span></p>
<p>This post is brought to you by Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/"><span style="color:#000000;">http://numericalmethods.eng.usf.edu</span></a>, the textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html"><span style="color:#1c9bdc;">Numerical Methods with Applications</span></a> available from the <a href="http://stores.lulu.com/kawautar"><span style="color:#1c9bdc;">lulu storefront</span></a>, and the YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos"><span style="color:#000000;">http://numericalmethods.eng.usf.edu/videos</span></a> <span style="color:#000000;">and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></span></p>
<p>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie"><span style="color:#1c9bdc;">reader</span></a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US"><span style="color:#1c9bdc;">email</span></a> to stay updated with this blog. Let the information follow you</p>
Posted in matlab, MATLAB programming, Numerical Methods, Ordinary Differential Equations Tagged: matlab, ode45, Ordinary Differential Equations <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/402/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=402&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/DKzclSlgjKM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/10/20/how-do-i-numerically-solve-an-ode-in-matlab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/10/20/how-do-i-numerically-solve-an-ode-in-matlab/</feedburner:origLink></item>
		<item>
		<title>The continue statement in MATLAB</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/rgMqgtUUETo/</link>
		<comments>http://autarkaw.wordpress.com/2009/10/16/the-continue-statement-in-matlab/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 20:42:18 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[MATLAB programming]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[continue]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=397</guid>
		<description><![CDATA[The continue statement in MATLAB is used to pass control to the next iteration in for and while statements.  Let&#8217;s suppose someone wants to find and print the value of k^2-50 for all integers in [-10,10] domain.  The mfile for that is given below.
% For integers k=-10,-9,&#8230;.,9,10,
% the function k^2-50 will take positive as
% well as negative values. 
%For [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=397&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The <a href="http://www.mathworks.com/access/helpdesk_r13/help/techdoc/ref/continue.html">continue</a> statement in MATLAB is used to pass control to the next iteration in for and while statements.  Let&#8217;s suppose someone wants to find and print the value of k^2-50 for all integers in [-10,10] domain.  The mfile for that is given below.</p>
<p><span style="color:#993300;">% For integers k=-10,-9,&#8230;.,9,10,<br />
% the function k^2-50 will take positive as<br />
% well as negative values. <br />
%For example, for k=-9, k^2-50=31; for k=1,<br />
% k^2-50=-49; for k=8, k^2-50=14.<br />
% The loop below will calculate values of k^2-50 for<br />
% all values of requested k.<br />
for k=-10:1:10<br />
    val=k^2-50;<br />
fprintf(&#8216;\n k=%g  val=%g&#8217;,k,val)<br />
end</span></p>
<p>___________________________________________________________</p>
<p>Let&#8217;s suppose now you are asked to calculate and print value of k^2-50 for all integers in [-10,10] domain but only if (k^2-50) is positive.</p>
<p><span style="color:#993300;">% The loop below will calculate and print values of k^2-50<br />
% for all values of the requested k<br />
% for which k^2-50 is positive.<br />
for k=-10:1:10<br />
    if (k^2-50&lt;0)<br />
        continue;<br />
    end<br />
    val=k^2-50;<br />
    fprintf(&#8216;\n k=%g  val=%g&#8217;,k,val)<br />
end</span></p>
<p>____________________________________________________________</p>
<p>Can you do what you did above using the while statement.  Yes, the MATLAB code is given below.</p>
<p><span style="color:#993300;">% Equivalent in while<br />
% The loop below will calculate values of k^2-50<br />
% for all values of the requested k for which k^2-50 is positive.<br />
</span><span style="color:#993300;">k=-10;<br />
while (k&lt;=10)<br />
    if (k^2-50&gt;0)<br />
        val=k^2-50;<br />
        fprintf(&#8216;\n k=%g  val=%g&#8217;,k,val)<br />
    end<br />
k=k+1;<br />
end</span></p>
<p>_______________________________________________________</p>
<p>This post is brought to you by Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/"><span style="color:#000000;">http://numericalmethods.eng.usf.edu</span></a>, the textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html"><span style="color:#1c9bdc;">Numerical Methods with Applications</span></a> available from the <a href="http://stores.lulu.com/kawautar"><span style="color:#1c9bdc;">lulu storefront</span></a>, and the YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos"><span style="color:#000000;">http://numericalmethods.eng.usf.edu/videos</span></a> <span style="color:#000000;">and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></span></p>
<p>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie"><span style="color:#1c9bdc;">reader</span></a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US"><span style="color:#1c9bdc;">email</span></a> to stay updated with this blog. Let the information follow you.</p>
Posted in matlab, MATLAB programming Tagged: continue, matlab <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/397/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/397/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/397/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=397&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/rgMqgtUUETo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/10/16/the-continue-statement-in-matlab/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/10/16/the-continue-statement-in-matlab/</feedburner:origLink></item>
		<item>
		<title>The break statement in MATLAB</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/JqxBlKExg2Y/</link>
		<comments>http://autarkaw.wordpress.com/2009/10/13/the-break-statement-in-matlab/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 00:11:50 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[Numerical Methods]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[break]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=391</guid>
		<description><![CDATA[The break statement in MATLAB is used to break out of a loop &#8211; a for or while statement, that is, it terminates the execution of the loop.  Let&#8217;s suppose someone wants to find the value of k^2-50 for all integers in [-10,10] domain.  The mfile for that is given below.
% For integers k=-10,-9,&#8230;.,9,10,
% the function k^2-50 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=391&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/break.html&amp;http://www.mathworks.com/access/helpdesk/help/techdoc/helpindex.html">break</a> statement in MATLAB is used to break out of a loop &#8211; a for or while statement, that is, it terminates the execution of the loop.  Let&#8217;s suppose someone wants to find the value of k^2-50 for all integers in [-10,10] domain.  The mfile for that is given below.</p>
<p><span style="color:#993300;">% For integers k=-10,-9,&#8230;.,9,10,<br />
% the function k^2-50 will take positive as<br />
% well as negative values. <br />
%For example, for k=-9, k^2-50=31; for k=1,<br />
% k^2-50=-49; for k=8, k^2-50=14.<br />
% The loop below will calculate values of k^2-50 for all values of requested k.<br />
for k=-10:1:10<br />
    val=k^2-50;<br />
end</span></p>
<p>___________________________________________________________</p>
<p>Let&#8217;s suppose now you are asked to calculate value of k^2-50 for all integers in [-10,10] domain but only until k^2-50 becomes negative.</p>
<p><span style="color:#993300;">% The loop below will calculate values of k^2-50<br />
% for all values of the requested k<br />
% until it turns negative<br />
for k=-10:1:10<br />
    if (k^2-50&lt;0)<br />
        break;<br />
    end<br />
    val=k^2-50;<br />
    fprintf(&#8216;\n k=%g  val=%g&#8217;,k,val)<br />
end</span></p>
<p>____________________________________________________________</p>
<p>Can you do what you did above using the while statement.  Yes, the MATLAB code is given below.</p>
<p><span style="color:#993300;">% Equivalent in while<br />
% The loop below will calculate values of k^2-50<br />
% for all values of the requested k until it turns negative<br />
k=-10;<br />
while (k&lt;=10) &amp; (k^2-50&gt;0)<br />
    val=k^2-50;<br />
    fprintf(&#8216;\n k=%g  val=%g&#8217;,k,val)<br />
    k=k+1;<br />
end</span></p>
<p>_______________________________________________________</p>
<p>This post is brought to you by Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/"><span style="color:#000000;">http://numericalmethods.eng.usf.edu</span></a>, the textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html"><span style="color:#1c9bdc;">Numerical Methods with Applications</span></a> available from the <a href="http://stores.lulu.com/kawautar"><span style="color:#1c9bdc;">lulu storefront</span></a>, and the YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos"><span style="color:#000000;">http://numericalmethods.eng.usf.edu/videos</span></a> <span style="color:#000000;">and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></span></p>
<p>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie"><span style="color:#1c9bdc;">reader</span></a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US"><span style="color:#1c9bdc;">email</span></a> to stay updated with this blog. Let the information follow you.</p>
Posted in matlab, Numerical Methods Tagged: break, matlab <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/391/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/391/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/391/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=391&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/JqxBlKExg2Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/10/13/the-break-statement-in-matlab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/10/13/the-break-statement-in-matlab/</feedburner:origLink></item>
		<item>
		<title>Are software bugs categorised as “that is the way it is”</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/2PL6gg9TNd8/</link>
		<comments>http://autarkaw.wordpress.com/2009/09/24/are-software-bugs-categorised-as-that-is-the-way-it-is/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 21:01:51 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[Numerical Methods]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=385</guid>
		<description><![CDATA[For a few years, I thought that the shame was only on financial companies to have dragged us through the economic mess.  Whether the mess is now affecting our software industry or if it is the new attitude of software companies, remains to be seen.  Three different pieces of software that I use for teaching and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=385&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For a few years, I thought that the shame was only on financial companies to have dragged us through the economic mess.  Whether the mess is now affecting our software industry or if it is the new attitude of software companies, remains to be seen.  Three different pieces of software that I use for teaching and research in a large university in the Southeast USA, have serious flaws which the companies are taking semi-seriously or as a matter of &#8220;life goes on&#8221;. </p>
<p>One of them is a finite element program.  Running the input file in a new version gives segmentation fault and the company acknowledges that it is a problem.  To stop wasting our time and not having to use the features of the new version, we requested that they give us the license for the older version until they fix the problem.  It took more than a couple of weeks of reminders (what else our IT group had to do) to get the older version.  Then they did not give us the parallel version of the program and we are still waiting for that.</p>
<p>Second is a program that makes interactive quizzes for mathematics courses.  This software gives the result as incorrect even for correct answers if the correct answer is a negative number.  This makes the program useless for what I want to do.  Their take on it &#8211; we cannot update it right away.  Hey, this is making your program useless to me &#8211; wake up.  Even after pointing out to them where the potential bug can be (without looking at the program) and which it was, they still did not help me.  I even told them how to fix it.  Only after much wrangling and waiting for two months, they are promising the update in October.  I hope they test it with the test file I sent them; otherwise, I am at square one until December.</p>
<p>Third is a computational package.  They updated their symbolic package with a different package and my students now get two different sets of answers using two different versions.  The answers are correct but one version gives only one solution while the other version gives multiple solutions.  I need the multiple solutions so that students can pick the most appropriate answer.  What I heard from them was -&#8221;That is the way it is&#8221;.  Only after much wrangling and calling their reply a &#8220;cop out&#8221; did they acknowledge it as a problem and gave me an alternate solution.  See I am teaching the first programming course to engineers and I cannot teach them to work around the bugs of the software itself.  Their confidence is shaken and I have to be extra vigilant now - is it the software or is it the students.  Nothing can be taken at face value anymore.  And these students are the future industrial users of the software.</p>
<p>Bugs are part of life for any software but when you are making millions of dollars of profit, you have an obligation to work on the bugs that make your software unusable.  What I am finding out is the software companies attitude is that they are safe in treating their customer any way they like – they may not be &#8220;too big to fail&#8221; but they are &#8220;too entrenched to fail&#8221;.  Good day!</p>
<p> _________________________________________________________________________________________________________________________</p>
<p>This post is brought to you by</p>
<ul>
<li>Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/"><span style="color:#000000;">http://numericalmethods.eng.usf.edu</span></a>,</li>
<li>Textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html"><span style="color:#1c9bdc;">Numerical Methods with Applications</span></a> available from the <a href="http://stores.lulu.com/kawautar"><span style="color:#1c9bdc;">lulu storefront</span></a>,</li>
<li>YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos"><span style="color:#000000;">http://numericalmethods.eng.usf.edu/videos</span></a> <span style="color:#000000;">and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></span></li>
<li>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie"><span style="color:#1c9bdc;">reader</span></a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US"><span style="color:#1c9bdc;">email</span></a> to stay updated with this blog. Let the information follow you.</li>
</ul>
Posted in Numerical Methods  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/385/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=385&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/2PL6gg9TNd8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/09/24/are-software-bugs-categorised-as-that-is-the-way-it-is/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/09/24/are-software-bugs-categorised-as-that-is-the-way-it-is/</feedburner:origLink></item>
		<item>
		<title>You can watch the numerical methods videos on a mobile device</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/BNOGXj95EeQ/</link>
		<comments>http://autarkaw.wordpress.com/2009/09/16/you-can-watch-the-numerical-methods-videos-on-a-mobile-device/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 17:34:01 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[Numerical Methods]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=378</guid>
		<description><![CDATA[We are in the process of putting appropriate content of the numerical methods website so that it can be viewed on mobile devices.  So far we have checked that it works on the Itouch, Iphone, Blackberry, LG New.
The mobile website is at http://numericalmethods.eng.usf.edu/mobile.  Let me know what you think about this development.
_________________________________________________________________________________________________________________________
This post is brought to you by

Holistic [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=378&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We are in the process of putting appropriate content of the <a href="http://numericalmethods.eng.usf.edu">numerical methods website</a> so that it can be viewed on mobile devices.  So far we have checked that it works on the Itouch, Iphone, Blackberry, LG New.</p>
<p>The mobile website is at <a href="http://numericalmethods.eng.usf.edu/mobile">http://numericalmethods.eng.usf.edu/mobile</a>.  Let me know what you think about this development.</p>
<p>_________________________________________________________________________________________________________________________</p>
<p>This post is brought to you by</p>
<ul>
<li>Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/"><span style="color:#000000;">http://numericalmethods.eng.usf.edu</span></a>,</li>
<li>Textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html"><span style="color:#1c9bdc;">Numerical Methods with Applications</span></a> available from the <a href="http://stores.lulu.com/kawautar"><span style="color:#1c9bdc;">lulu storefront</span></a>,</li>
<li>YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos"><span style="color:#000000;">http://numericalmethods.eng.usf.edu/videos</span></a> <span style="color:#000000;">and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></span></li>
<li>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie"><span style="color:#1c9bdc;">reader</span></a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US"><span style="color:#1c9bdc;">email</span></a> to stay updated with this blog. Let the information follow you.</li>
</ul>
Posted in Numerical Methods  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/378/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/378/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/378/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=378&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/BNOGXj95EeQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/09/16/you-can-watch-the-numerical-methods-videos-on-a-mobile-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/09/16/you-can-watch-the-numerical-methods-videos-on-a-mobile-device/</feedburner:origLink></item>
		<item>
		<title>How do I solve simultaneous linear equations given in equation form?</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/UhXWRuP1vwI/</link>
		<comments>http://autarkaw.wordpress.com/2009/08/21/how-do-i-solve-simultaneous-linear-equations-given-in-equation-form/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 11:01:31 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[MATLAB programming]]></category>
		<category><![CDATA[Numerical Methods]]></category>
		<category><![CDATA[Simultaneous Linear Equations]]></category>
		<category><![CDATA[matlab]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=372</guid>
		<description><![CDATA[Many students ask me how do I do this or that in MATLAB.  So I thought why not have a small series of my next few blogs do that.  In this blog, I show you how to solve simultaneous linear equations given in equation form.

The MATLAB program link is here.
The HTML version of the MATLAB [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=372&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Many students ask me how do I do this or that in MATLAB.  So I thought why not have a small series of my next few blogs do that.  In this blog, I show you how to solve simultaneous linear equations given in equation form.</p>
<ul>
<li>The MATLAB program link is <a href="http://numericalmethods.eng.usf.edu/blog/sle_equations.m">here</a>.</li>
<li>The HTML version of the MATLAB program is <a href="http://numericalmethods.eng.usf.edu/blog/html/sle_equations.html">here</a>.</li>
<li><strong>DO NOT COPY AND PASTE THE PROGRAM BELOW BECAUSE THE SINGLE QUOTES DO NOT TRANSLATE TO THE CORRECT SINGLE QUOTES IN MATLAB EDITOR.  </strong><a href="http://numericalmethods.eng.usf.edu/blog/sle_equations.m" target="_blank"><strong>DOWNLOAD THE MATLAB PROGRAM</strong></a><strong> INSTEAD</strong></li>
</ul>
<p>%% HOW DO I DO THAT IN MATLAB SERIES?<br />
% In this series, I am answering questions that students have asked<br />
% me about MATLAB.  Most of the questions relate to a mathematical<br />
% procedure.</p>
<p>%% TOPIC<br />
% How do I solve a set of simultaneous linear equations<br />
% given in equation form?</p>
<p>%% SUMMARY</p>
<p>% Language : Matlab 2008a;<br />
% Authors : Autar Kaw;<br />
% Mfile available at<br />
% <a href="http://numericalmethods.eng.usf.edu/blog/sle_equations.m">http://numericalmethods.eng.usf.edu/blog/sle_equations.m</a>;<br />
% Last Revised : August 22, 2009;<br />
% Abstract: This program shows you how to solve a set of<br />
%     simultaneous linear equations given in equation form?<br />
%           .<br />
clc<br />
clear all<br />
clf</p>
<p>%% INTRODUCTION</p>
<p>disp(&#8216;ABSTRACT&#8217;)<br />
disp(&#8216;   This program shows you how to solve a&#8217;)<br />
disp(&#8216;   set of simultaneous linear equations given in equation form&#8217;)<br />
disp(&#8216; &#8216;)<br />
disp(&#8216;AUTHOR&#8217;)<br />
disp(&#8216;   Autar K Kaw of <a href="http://autarkaw.wordpress.com'">http://autarkaw.wordpress.com&#8217;</a>)<br />
disp(&#8216; &#8216;)<br />
disp(&#8216;MFILE SOURCE&#8217;)<br />
disp(&#8216;   <a href="http://numericalmethods.eng.usf.edu/blog/sle_equations.m'">http://numericalmethods.eng.usf.edu/blog/sle_equations.m&#8217;</a>)<br />
disp(&#8216; &#8216;)<br />
disp(&#8216;LAST REVISED&#8217;)<br />
disp(&#8216;   August 22, 2009&#8242;)<br />
disp(&#8216; &#8216;)</p>
<p>%% INPUTS<br />
% Enter the equations<br />
eqn1=&#8217;12*a+23*b+39*c=29&#8242;;<br />
eqn2=&#8217;13*a+17*b+19*c=37&#8242;;<br />
eqn3=&#8217;21*a+23*b+29*c=59&#8242;;<br />
%% DISPLAYING INPUTS<br />
disp(&#8216;  &#8216;)<br />
disp(&#8216;INPUTS&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
disp(&#8216;Equations&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
disp(eqn1)<br />
disp(eqn2)<br />
disp(eqn3)</p>
<p>%% THE CODE<br />
% The solution<br />
X=solve(eqn1,eqn2,eqn3);<br />
% Assigning the output<br />
a=double(X.a);<br />
b=double(X.b);<br />
c=double(X.c);<br />
%% DISPLAYING OUTPUTS<br />
disp(&#8216;  &#8216;)<br />
disp(&#8216;OUTPUTS&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
disp(&#8216;Solution Vector&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
fprintf(&#8216;\nValue of a= %g&#8217;,a)<br />
fprintf(&#8216;\nValue of b= %g&#8217;,b)<br />
fprintf(&#8216;\nValue of c= %g&#8217;,c)<br />
disp(&#8216;  &#8216;)<br />
disp(&#8216;________________________&#8217;)</p>
<p>This post is brought to you by Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/"><span style="color:#000000;">http://numericalmethods.eng.usf.edu</span></a>, the textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html"><span style="color:#1c9bdc;">Numerical Methods with Applications</span></a> available from the <a href="http://stores.lulu.com/kawautar"><span style="color:#1c9bdc;">lulu storefront</span></a>, and the YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos"><span style="color:#000000;">http://numericalmethods.eng.usf.edu/videos</span></a> <span style="color:#000000;">and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></span></p>
<p>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie"><span style="color:#1c9bdc;">reader</span></a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US"><span style="color:#1c9bdc;">email</span></a> to stay updated with this blog. Let the information follow you.</p>
Posted in matlab, MATLAB programming, Numerical Methods, Simultaneous Linear Equations Tagged: matlab, Simultaneous Linear Equations <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/372/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/372/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/372/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=372&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/UhXWRuP1vwI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/08/21/how-do-i-solve-simultaneous-linear-equations-given-in-equation-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/08/21/how-do-i-solve-simultaneous-linear-equations-given-in-equation-form/</feedburner:origLink></item>
		<item>
		<title>How do I solve a set of simultaneous linear equations given in matrix form?</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/qqDXZh6Ymss/</link>
		<comments>http://autarkaw.wordpress.com/2009/08/12/how-do-i-solve-a-set-of-simultaneous-linear-equations-given-in-matrix-form/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 18:05:56 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[Numerical Methods]]></category>
		<category><![CDATA[Simultaneous Linear Equations]]></category>
		<category><![CDATA[matlab]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=369</guid>
		<description><![CDATA[Many students ask me how do I do this or that in MATLAB.  So I thought why not have a small series of my next few blogs do that.  In this blog, I show you how to solve simultaneous linear equations given in matrix form.

The MATLAB program link is here.
The HTML version of the MATLAB [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=369&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Many students ask me how do I do this or that in MATLAB.  So I thought why not have a small series of my next few blogs do that.  In this blog, I show you how to solve simultaneous linear equations given in matrix form.</p>
<ul>
<li>The MATLAB program link is <a href="http://numericalmethods.eng.usf.edu/blog/sle.m">here</a>.</li>
<li>The HTML version of the MATLAB program is <a href="http://numericalmethods.eng.usf.edu/blog/html/sle.html">here</a>.</li>
<li><strong>DO NOT COPY AND PASTE THE PROGRAM BELOW BECAUSE THE SINGLE QUOTES DO NOT TRANSLATE TO THE CORRECT SINGLE QUOTES IN MATLAB EDITOR.  </strong><a href="http://numericalmethods.eng.usf.edu/blog/sle.m" target="_blank"><strong>DOWNLOAD THE MATLAB PROGRAM</strong></a><strong> INSTEAD</strong></li>
</ul>
<p>%% HOW DO I DO THAT IN MATLAB SERIES?<br />
% In this series, I am answering questions that students have asked<br />
% me about MATLAB.  Most of the questions relate to a mathematical<br />
% procedure.</p>
<p>%% TOPIC<br />
% How do I solve a set of simultaneous linear equations?</p>
<p>%% SUMMARY</p>
<p>% Language : Matlab 2008a;<br />
% Authors : Autar Kaw;<br />
% Mfile available at<br />
% <a href="http://numericalmethods.eng.usf.edu/blog/sle.m">http://numericalmethods.eng.usf.edu/blog/sle.m</a>;<br />
% Last Revised : August 12, 2009;<br />
% Abstract: This program shows you how to solve a set of simultaneous linear<br />
% equations?<br />
%           .<br />
clc<br />
clear all<br />
clf</p>
<p>%% INTRODUCTION</p>
<p>disp(&#8216;ABSTRACT&#8217;)<br />
disp(&#8216;   This program shows you how to solve a&#8217;)<br />
disp(&#8216;   set of simultaneous linear equations&#8217;)<br />
disp(&#8216; &#8216;)<br />
disp(&#8216;AUTHOR&#8217;)<br />
disp(&#8216;   Autar K Kaw of <a href="http://autarkaw.wordpress.com'">http://autarkaw.wordpress.com&#8217;</a>)<br />
disp(&#8216; &#8216;)<br />
disp(&#8216;MFILE SOURCE&#8217;)<br />
disp(&#8216;   <a href="http://numericalmethods.eng.usf.edu/blog/sle.m'">http://numericalmethods.eng.usf.edu/blog/sle.m&#8217;</a>)<br />
disp(&#8216; &#8216;)<br />
disp(&#8216;LAST REVISED&#8217;)<br />
disp(&#8216;   August 12, 2009&#8242;)<br />
disp(&#8216; &#8216;)</p>
<p>%% INPUTS<br />
% Enter the coefficient matrix of the equation [A][X]=[C]<br />
A=[12  23  39; 13  17  19; 21  23  29];<br />
% Enter the right hand side vector<br />
C=[29;   37;  59];<br />
%% DISPLAYING INPUTS<br />
disp(&#8216;  &#8216;)<br />
disp(&#8216;INPUTS&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
disp(&#8216;Coefficient Matrix&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
dataval=[A];<br />
disp(dataval)<br />
disp(&#8216;________________________&#8217;)<br />
disp(&#8216;Right hand side vector&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
dataval=[C];<br />
disp(dataval)<br />
disp(&#8216;________________________&#8217;)</p>
<p>%% THE CODE<br />
% The solution<br />
X=A\C;</p>
<p>%% DISPLAYING OUTPUTS<br />
disp(&#8216;  &#8216;)<br />
disp(&#8216;OUTPUTS&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
disp(&#8216;Solution Vector&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
dataval=[X];<br />
disp(dataval)<br />
disp(&#8216;________________________&#8217;)</p>
<p>his post is brought to you by Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/"><span style="color:#000000;">http://numericalmethods.eng.usf.edu</span></a>, the textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html"><span style="color:#1c9bdc;">Numerical Methods with Applications</span></a> available from the <a href="http://stores.lulu.com/kawautar"><span style="color:#1c9bdc;">lulu storefront</span></a>, and the YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos"><span style="color:#000000;">http://numericalmethods.eng.usf.edu/videos</span></a> <span style="color:#000000;">and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></span></p>
<p>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie"><span style="color:#1c9bdc;">reader</span></a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US"><span style="color:#1c9bdc;">email</span></a> to stay updated with this blog. Let the information follow you.</p>
Posted in matlab, Numerical Methods, Simultaneous Linear Equations Tagged: matlab, Simultaneous Linear Equations <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=369&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/qqDXZh6Ymss" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/08/12/how-do-i-solve-a-set-of-simultaneous-linear-equations-given-in-matrix-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/08/12/how-do-i-solve-a-set-of-simultaneous-linear-equations-given-in-matrix-form/</feedburner:origLink></item>
		<item>
		<title>How do I do polynomial regression in MATLAB?</title>
		<link>http://feedproxy.google.com/~r/wordpress/EDie/~3/VINB7slzTDw/</link>
		<comments>http://autarkaw.wordpress.com/2009/08/03/how-do-i-do-polynomial-regression-in-matlab/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 17:53:25 +0000</pubDate>
		<dc:creator>Autar Kaw</dc:creator>
				<category><![CDATA[MATLAB programming]]></category>
		<category><![CDATA[Numerical Methods]]></category>
		<category><![CDATA[matlab]]></category>
		<category><![CDATA[Regression]]></category>

		<guid isPermaLink="false">http://autarkaw.wordpress.com/?p=366</guid>
		<description><![CDATA[Many students ask me how do I do this or that in MATLAB.  So I thought why not have a small series of my next few blogs do that.  In this blog, I show you how to do polynomial regression.

The MATLAB program link is here.
The HTML version of the MATLAB program is here.
DO NOT COPY [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=366&subd=autarkaw&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Many students ask me how do I do this or that in MATLAB.  So I thought why not have a small series of my next few blogs do that.  In this blog, I show you how to do polynomial regression.</p>
<ul>
<li>The MATLAB program link is <a href="http://numericalmethods.eng.usf.edu/blog/regression_polynomial.m">here</a>.</li>
<li>The HTML version of the MATLAB program is <a href="http://numericalmethods.eng.usf.edu/blog/html/regression_polynomial.html">here</a>.</li>
<li><strong>DO NOT COPY AND PASTE THE PROGRAM BELOW BECAUSE THE SINGLE QUOTES DO NOT TRANSLATE TO THE CORRECT SINGLE QUOTES IN MATLAB EDITOR.  </strong><a href="http://numericalmethods.eng.usf.edu/blog/regression_polynomial.m" target="_blank"><strong>DOWNLOAD THE MATLAB PROGRAM</strong></a><strong> INSTEAD</strong></li>
</ul>
<p>%% HOW DO I DO THAT IN MATLAB SERIES?<br />
% In this series, I am answering questions that students have asked<br />
% me about MATLAB.  Most of the questions relate to a mathematical<br />
% procedure.</p>
<p>%% TOPIC<br />
% How do I do polynomial regression?</p>
<p>%% SUMMARY</p>
<p>% Language : Matlab 2008a;<br />
% Authors : Autar Kaw;<br />
% Mfile available at<br />
% <a href="http://numericalmethods.eng.usf.edu/blog/regression_polynomial.m">http://numericalmethods.eng.usf.edu/blog/regression_polynomial.m</a>;<br />
% Last Revised : August 3, 2009;<br />
% Abstract: This program shows you how to do polynomial regression?<br />
%           .<br />
clc<br />
clear all<br />
clf</p>
<p>%% INTRODUCTION</p>
<p>disp(&#8216;ABSTRACT&#8217;)<br />
disp(&#8216;   This program shows you how to do polynomial regression&#8217;)<br />
disp(&#8216; &#8216;)<br />
disp(&#8216;AUTHOR&#8217;)<br />
disp(&#8216;   Autar K Kaw of <a href="http://autarkaw.wordpress.com'">http://autarkaw.wordpress.com&#8217;</a>)<br />
disp(&#8216; &#8216;)<br />
disp(&#8216;MFILE SOURCE&#8217;)<br />
disp(&#8216;   <a href="http://numericalmethods.eng.usf.edu/blog/regression_polynomial.m'">http://numericalmethods.eng.usf.edu/blog/regression_polynomial.m&#8217;</a>)<br />
disp(&#8216; &#8216;)<br />
disp(&#8216;LAST REVISED&#8217;)<br />
disp(&#8216;   August 3, 2009&#8242;)<br />
disp(&#8216; &#8216;)</p>
<p>%% INPUTS<br />
% y vs x data to regress<br />
% x data<br />
x=[-340  -280  -200  -120  -40  40  80];<br />
% ydata<br />
y=[2.45  3.33  4.30   5.09  5.72  6.24  6.47];<br />
% Where do you want to find the values at<br />
xin=[-300 -100 20  125];<br />
%% DISPLAYING INPUTS<br />
disp(&#8216;  &#8216;)<br />
disp(&#8216;INPUTS&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
disp(&#8216;     x         y  &#8216;)<br />
disp(&#8216;________________________&#8217;)<br />
dataval=[x;y]&#8216;;<br />
disp(dataval)<br />
disp(&#8216;________________________&#8217;)<br />
disp(&#8216;   &#8216;)<br />
disp(&#8216;The x values where you want to predict the y values&#8217;)<br />
dataval=[xin]&#8216;;<br />
disp(dataval)<br />
disp(&#8216;________________________&#8217;)<br />
disp(&#8216;  &#8216;)</p>
<p>%% THE CODE<br />
% Using polyfit to conduct polynomial regression to a polynomial of order 1<br />
pp=polyfit(x,y,1);<br />
% Predicting values at given x values<br />
yin=polyval(pp,xin);<br />
% This is only for plotting the regression model<br />
% Find the number of data points<br />
n=length(x);<br />
xplot=x(1):(x(n)-x(1))/10000:x(n);<br />
yplot=polyval(pp,xplot);<br />
%% DISPLAYING OUTPUTS<br />
disp(&#8216;  &#8216;)<br />
disp(&#8216;OUTPUTS&#8217;)<br />
disp(&#8216;________________________&#8217;)<br />
disp(&#8216;   xasked   ypredicted  &#8216;)<br />
disp(&#8216;________________________&#8217;)<br />
dataval=[xin;yin]&#8216;;<br />
disp(dataval)<br />
disp(&#8216;________________________&#8217;)</p>
<p>xlabel(&#8216;x&#8217;);<br />
ylabel(&#8216;y&#8217;);<br />
title(&#8216;y vs x &#8216;);<br />
plot(x,y,&#8217;o',&#8217;MarkerSize&#8217;,5,&#8217;MarkerEdgeColor&#8217;,'b&#8217;,'MarkerFaceColor&#8217;,'b&#8217;)<br />
hold on<br />
plot(xin,yin,&#8217;o',&#8217;MarkerSize&#8217;,5,&#8217;MarkerEdgeColor&#8217;,'r&#8217;,'MarkerFaceColor&#8217;,'r&#8217;)<br />
hold on<br />
plot(xplot,yplot,&#8217;LineWidth&#8217;,2)<br />
legend(&#8216;Points given&#8217;,'Points found&#8217;,'Regression Curve&#8217;,'Location&#8217;,'East&#8217;)<br />
hold off<br />
disp(&#8216;  &#8216;)</p>
<p>This post is brought to you by Holistic Numerical Methods: Numerical Methods for the STEM undergraduate at <a href="http://numericalmethods.eng.usf.edu/"><span style="color:#000000;">http://numericalmethods.eng.usf.edu</span></a>, the textbook on <a href="http://autarkaw.com/books/numericalmethods/index.html"><span style="color:#1c9bdc;">Numerical Methods with Applications</span></a> available from the <a href="http://stores.lulu.com/kawautar"><span style="color:#1c9bdc;">lulu storefront</span></a>, and the YouTube video lectures available at <a href="http://numericalmethods.eng.usf.edu/videos"><span style="color:#000000;">http://numericalmethods.eng.usf.edu/videos</span></a> <span style="color:#000000;">and <a href="http://www.youtube.com/numericalmethodsguy">http://www.youtube.com/numericalmethodsguy</a></span></p>
<p>Subscribe to the blog via a <a href="http://feeds.feedburner.com/wordpress/EDie"><span style="color:#1c9bdc;">reader</span></a> or <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2178495&amp;loc=en_US"><span style="color:#1c9bdc;">email</span></a> to stay updated with this blog. Let the information follow you.</p>
Posted in MATLAB programming, Numerical Methods Tagged: matlab, Regression <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/autarkaw.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/autarkaw.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/autarkaw.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/autarkaw.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/autarkaw.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/autarkaw.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/autarkaw.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/autarkaw.wordpress.com/366/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/autarkaw.wordpress.com/366/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/autarkaw.wordpress.com/366/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=autarkaw.wordpress.com&blog=3780249&post=366&subd=autarkaw&ref=&feed=1" /></div><img src="http://feeds.feedburner.com/~r/wordpress/EDie/~4/VINB7slzTDw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://autarkaw.wordpress.com/2009/08/03/how-do-i-do-polynomial-regression-in-matlab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">The numerical methods guy</media:title>
		</media:content>
	<feedburner:origLink>http://autarkaw.wordpress.com/2009/08/03/how-do-i-do-polynomial-regression-in-matlab/</feedburner:origLink></item>
	</channel>
</rss>
