<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Function subs gives rise to lots of unexpected (0) and (1)</title>
    <link>http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 10:19:58 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 10:19:58 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Function subs gives rise to lots of unexpected (0) and (1)</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Function subs gives rise to lots of unexpected (0) and (1)</title>
      <link>http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0</link>
    </image>
    <item>
      <title>Use eval instead</title>
      <link>http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0?ref=Feed:MaplePrimes:Function subs gives rise to lots of unexpected (0) and (1):Comments#answer144289</link>
      <itunes:summary>&lt;p&gt;You can use eval instead. Compare:&lt;/p&gt;
&lt;p&gt;u:=sin(x)+cos(y);&lt;br&gt;subs({x=Pi/4,y=Pi/2},u);&lt;br&gt;%;&lt;br&gt;# with&lt;br&gt;eval(u,{x=Pi/4,y=Pi/2});&lt;/p&gt;
&lt;p&gt;# and see&lt;/p&gt;
&lt;p&gt;?subs&lt;br&gt;where it says:&lt;/p&gt;
&lt;p&gt;"&amp;nbsp;Simple applications of replacing a symbol by a value in a formula should normally be done with the eval command."&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;You can use eval instead. Compare:&lt;/p&gt;
&lt;p&gt;u:=sin(x)+cos(y);&lt;br&gt;subs({x=Pi/4,y=Pi/2},u);&lt;br&gt;%;&lt;br&gt;# with&lt;br&gt;eval(u,{x=Pi/4,y=Pi/2});&lt;/p&gt;
&lt;p&gt;# and see&lt;/p&gt;
&lt;p&gt;?subs&lt;br&gt;where it says:&lt;/p&gt;
&lt;p&gt;"&amp;nbsp;Simple applications of replacing a symbol by a value in a formula should normally be done with the eval command."&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;</description>
      <guid>144289</guid>
      <pubDate>Thu, 07 Mar 2013 18:45:24 Z</pubDate>
      <itunes:author>Preben Alsholm</itunes:author>
      <author>Preben Alsholm</author>
    </item>
    <item>
      <title>Whole worksheet</title>
      <link>http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0?ref=Feed:MaplePrimes:Function subs gives rise to lots of unexpected (0) and (1):Comments#answer144294</link>
      <itunes:summary>&lt;p&gt;Here it is:&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=144294/455479/damping_ratio.mw"&gt;damping_ratio.mw&lt;/a&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Here it is:&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=144294/455479/damping_ratio.mw"&gt;damping_ratio.mw&lt;/a&gt;&lt;/p&gt;</description>
      <guid>144294</guid>
      <pubDate>Thu, 07 Mar 2013 19:19:31 Z</pubDate>
      <itunes:author>PlpPlp</itunes:author>
      <author>PlpPlp</author>
    </item>
    <item>
      <title>Multiplication signs missing</title>
      <link>http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0?ref=Feed:MaplePrimes:Function subs gives rise to lots of unexpected (0) and (1):Comments#answer144295</link>
      <itunes:summary>&lt;p&gt;Try&lt;/p&gt;
&lt;p&gt;indets(ratio,function);&lt;/p&gt;
&lt;p&gt;and you will see expressions like&lt;/p&gt;
&lt;p&gt;B[1](m[10]^2+m[20]^2)&lt;/p&gt;
&lt;p&gt;These are of type function in Maple, same as f(x) or f(2).&lt;br&gt;The expression should have been&lt;br&gt;B[1]*(m[10]^2+m[20]^2)&lt;/p&gt;
&lt;p&gt;You may try to repair the damage the easy way:&lt;/p&gt;
&lt;p&gt;newratio:=evalindets(ratio,function,x-&amp;gt;op(0,x)*op(1,x)):&lt;br&gt;eval(newratio, [m[10] = 0, m[20] = 0, m[30] = 1]);&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Try&lt;/p&gt;
&lt;p&gt;indets(ratio,function);&lt;/p&gt;
&lt;p&gt;and you will see expressions like&lt;/p&gt;
&lt;p&gt;B[1](m[10]^2+m[20]^2)&lt;/p&gt;
&lt;p&gt;These are of type function in Maple, same as f(x) or f(2).&lt;br&gt;The expression should have been&lt;br&gt;B[1]*(m[10]^2+m[20]^2)&lt;/p&gt;
&lt;p&gt;You may try to repair the damage the easy way:&lt;/p&gt;
&lt;p&gt;newratio:=evalindets(ratio,function,x-&amp;gt;op(0,x)*op(1,x)):&lt;br&gt;eval(newratio, [m[10] = 0, m[20] = 0, m[30] = 1]);&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;</description>
      <guid>144295</guid>
      <pubDate>Thu, 07 Mar 2013 20:04:30 Z</pubDate>
      <itunes:author>Preben Alsholm</itunes:author>
      <author>Preben Alsholm</author>
    </item>
    <item>
      <title>Already done.</title>
      <link>http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0?ref=Feed:MaplePrimes:Function subs gives rise to lots of unexpected (0) and (1):Comments#comment144291</link>
      <itunes:summary>&lt;p&gt;I should have mentionned that in my first post. I tried eval as well and I got the same results, surprisingly...&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;I should have mentionned that in my first post. I tried eval as well and I got the same results, surprisingly...&lt;/p&gt;</description>
      <guid>144291</guid>
      <pubDate>Thu, 07 Mar 2013 18:55:43 Z</pubDate>
      <itunes:author>PlpPlp</itunes:author>
      <author>PlpPlp</author>
    </item>
    <item>
      <title>Upload</title>
      <link>http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0?ref=Feed:MaplePrimes:Function subs gives rise to lots of unexpected (0) and (1):Comments#comment144292</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0#comment144291"&gt;@PlpPlp&lt;/a&gt; Upload the long expression.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0#comment144291"&gt;@PlpPlp&lt;/a&gt; Upload the long expression.&lt;/p&gt;</description>
      <guid>144292</guid>
      <pubDate>Thu, 07 Mar 2013 19:06:22 Z</pubDate>
      <itunes:author>Carl Love</itunes:author>
      <author>Carl Love</author>
    </item>
    <item>
      <title>Thanks a lot</title>
      <link>http://www.mapleprimes.com/questions/144288-Function-Subs-Gives-Rise-To-Lots-Of-Unexpected-0?ref=Feed:MaplePrimes:Function subs gives rise to lots of unexpected (0) and (1):Comments#comment144307</link>
      <itunes:summary>&lt;p&gt;That worked perfectly, thanks a lot! I guess the Maple GUI would need some refinements for novices like me!&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;That worked perfectly, thanks a lot! I guess the Maple GUI would need some refinements for novices like me!&lt;/p&gt;</description>
      <guid>144307</guid>
      <pubDate>Thu, 07 Mar 2013 23:28:05 Z</pubDate>
      <itunes:author>PlpPlp</itunes:author>
      <author>PlpPlp</author>
    </item>
  </channel>
</rss>