<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240915</link>
    <title>MATLAB Central Newsreader - differnt methods to sum positive numbers to achieve a number</title>
    <description>Feed for thread: differnt methods to sum positive numbers to achieve a number</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 12 Dec 2008 14:56:03 -0500</pubDate>
      <title>differnt methods to sum positive numbers to achieve a number</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240915#616642</link>
      <author>Amir Hossein </author>
      <description>consider that we have a number. for example 5. i want to know how i can writhe a code to mention all the different ways that positive numbers can be summed up to give 5.&lt;br&gt;
1+1+1+1+1&lt;br&gt;
2+3&lt;br&gt;
2+2+1</description>
    </item>
    <item>
      <pubDate>Fri, 12 Dec 2008 15:45:05 -0500</pubDate>
      <title>Re: differnt methods to sum positive numbers to achieve a number</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240915#616656</link>
      <author>Jos </author>
      <description>&quot;Amir Hossein &quot; &amp;lt;a.gharehgozli@gmail.com&amp;gt; wrote in message &amp;lt;ghtu23$ikh$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; consider that we have a number. for example 5. i want to know how i can writhe a code to mention all the different ways that positive numbers can be summed up to give 5.&lt;br&gt;
&amp;gt; 1+1+1+1+1&lt;br&gt;
&amp;gt; 2+3&lt;br&gt;
&amp;gt; 2+2+1&lt;br&gt;
&lt;br&gt;
What about 0.1, 0.001, pi, 4.99999999999 etc. These are also positive numbers! Or do you mean integers only?&lt;br&gt;
&lt;br&gt;
I suggest you get some inspiration for writing your own code by looking at some of the excellent submissions by JohnD'Errico on the File Exchange.&lt;br&gt;
&lt;br&gt;
hth&lt;br&gt;
Jos</description>
    </item>
    <item>
      <pubDate>Fri, 12 Dec 2008 15:50:48 -0500</pubDate>
      <title>Re: differnt methods to sum positive numbers to achieve a number</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240915#616661</link>
      <author>Walter Roberson</author>
      <description>Amir Hossein wrote:&lt;br&gt;
&amp;gt; consider that we have a number. for example 5. i want to know how i can writhe&lt;br&gt;
&amp;gt; a code to mention all the different ways that positive numbers can be summed up to give 5.&lt;br&gt;
&amp;gt; 1+1+1+1+1&lt;br&gt;
&amp;gt; 2+3&lt;br&gt;
&amp;gt; 2+2+1&lt;br&gt;
&lt;br&gt;
Consider using recursion.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
.signature note: I am now avoiding replying to unclear or ambiguous postings.&lt;br&gt;
Please review questions before posting them. Be specific. Use examples of what you mean,&lt;br&gt;
of what you don't mean. Specify boundary conditions, and data classes and value&lt;br&gt;
relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?</description>
    </item>
  </channel>
</rss>

