<?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: A Brief History of polyval</title>
	<atom:link href="http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/</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>Mon, 13 Feb 2012 13:24:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Brian McIntosh</title>
		<link>http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/#comment-30468</link>
		<dc:creator>Brian McIntosh</dc:creator>
		<pubDate>Tue, 14 Jul 2009 14:53:49 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/#comment-30468</guid>
		<description>Nice topic, Loren. A few years ago while working with “ln” near unity, I ginned up the following functions.

function b = exp1(a)
%EXP1  (exp(a)-1) function
%	does not use HP-48 naming convention
%	since expm is taken
%	for use when exp(a) is nearly one
%	should work for any matrix [a]

%	Author(s): B. McIntosh   2004/03/01: 2004/03/30
%	Private user

rsf = size(a);
a = reshape(a,1,prod(rsf));
b = exp(a)-1;
ii = find(abs(a) &lt; 0.25);
b(ii) = (1./cumprod(1:12))*cumprod(ones(12,1)*a(ii));
b = reshape(b,rsf);
%% end of function

function b = lnp1(a)
%LNP1  log(a+1) function
%	uses HP-48 naming convention
%	for use when (a) is nearly zero
%	should work for any matrix [a]

%	Author(s): B. McIntosh   2004/03/01: 2004/03/10: 2004/03/30
%	Private user


rsf = size(a);
a = reshape(a,1,prod(rsf));
b = log(a+1);
ii = find(abs(a) &lt; 0.065);
b(ii) = -(1./(1:12))*cumprod(-1*ones(12,1)*a(ii));
b = reshape(b,rsf);
%% end of function</description>
		<content:encoded><![CDATA[<p>Nice topic, Loren. A few years ago while working with “ln” near unity, I ginned up the following functions.</p>
<p>function b = exp1(a)<br />
%EXP1  (exp(a)-1) function<br />
%	does not use HP-48 naming convention<br />
%	since expm is taken<br />
%	for use when exp(a) is nearly one<br />
%	should work for any matrix [a]</p>
<p>%	Author(s): B. McIntosh   2004/03/01: 2004/03/30<br />
%	Private user</p>
<p>rsf = size(a);<br />
a = reshape(a,1,prod(rsf));<br />
b = exp(a)-1;<br />
ii = find(abs(a) &lt; 0.25);<br />
b(ii) = (1./cumprod(1:12))*cumprod(ones(12,1)*a(ii));<br />
b = reshape(b,rsf);<br />
%% end of function</p>
<p>function b = lnp1(a)<br />
%LNP1  log(a+1) function<br />
%	uses HP-48 naming convention<br />
%	for use when (a) is nearly zero<br />
%	should work for any matrix [a]</p>
<p>%	Author(s): B. McIntosh   2004/03/01: 2004/03/10: 2004/03/30<br />
%	Private user</p>
<p>rsf = size(a);<br />
a = reshape(a,1,prod(rsf));<br />
b = log(a+1);<br />
ii = find(abs(a) &lt; 0.065);<br />
b(ii) = -(1./(1:12))*cumprod(-1*ones(12,1)*a(ii));<br />
b = reshape(b,rsf);<br />
%% end of function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Ross</title>
		<link>http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/#comment-30466</link>
		<dc:creator>James Ross</dc:creator>
		<pubDate>Mon, 13 Jul 2009 18:48:52 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/#comment-30466</guid>
		<description>Loren,
Good question! I tend to write one algorithm and try to make it solid - the right answer is far more important than execution time, especially with the speed of today&#039;s PC&#039;s.

If I feel Matlab is taking too long to execute my routines, out comes the Profiler and I attack the big hitters until the execution time is back under control. Recently, a colleague and I were able to reduce algorithm run-time from 12.5 hours down to 2.5 hours with a handful of changes based on the Profiler! With a few additional changes based on how we used Simulink, the final execution time was 30 minutes.

While I&#039;ve always been a big proponent of optimization to minimize end-user pain, that type of work has to be weighed against robustness and the effort required to eke out that last bit of performance.</description>
		<content:encoded><![CDATA[<p>Loren,<br />
Good question! I tend to write one algorithm and try to make it solid &#8211; the right answer is far more important than execution time, especially with the speed of today&#8217;s PC&#8217;s.</p>
<p>If I feel Matlab is taking too long to execute my routines, out comes the Profiler and I attack the big hitters until the execution time is back under control. Recently, a colleague and I were able to reduce algorithm run-time from 12.5 hours down to 2.5 hours with a handful of changes based on the Profiler! With a few additional changes based on how we used Simulink, the final execution time was 30 minutes.</p>
<p>While I&#8217;ve always been a big proponent of optimization to minimize end-user pain, that type of work has to be weighed against robustness and the effort required to eke out that last bit of performance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/#comment-30461</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 09 Jul 2009 10:52:49 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/#comment-30461</guid>
		<description>Daniel-

Thanks for your thoughts.  No spammers list, but the comments are moderated so I can weed out ones that are totally off-topic.  Please keep on commenting!

--Loren</description>
		<content:encoded><![CDATA[<p>Daniel-</p>
<p>Thanks for your thoughts.  No spammers list, but the comments are moderated so I can weed out ones that are totally off-topic.  Please keep on commenting!</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/#comment-30460</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Thu, 09 Jul 2009 07:18:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2009/07/08/a-brief-history-of-polyval/#comment-30460</guid>
		<description>As a sometimes follower of Dougs mantra, that one should not optimize if it sacrifices readibility, I tend to very carefully avoid multiple algorithms that do the same thing. Not only does the code become complex, but one must also verify both implementations, and the algorithm which selects which one to use. 

Now for end-user programs which are properly verified, that may be alright, but in my lab, one faulty calculation at the wrong time costs way more than a little sluggishness here and there.

--DA
PS. I seem to have ended up on the spamers-list for this blog. Is that because I comment too much? :P DS</description>
		<content:encoded><![CDATA[<p>As a sometimes follower of Dougs mantra, that one should not optimize if it sacrifices readibility, I tend to very carefully avoid multiple algorithms that do the same thing. Not only does the code become complex, but one must also verify both implementations, and the algorithm which selects which one to use. </p>
<p>Now for end-user programs which are properly verified, that may be alright, but in my lab, one faulty calculation at the wrong time costs way more than a little sluggishness here and there.</p>
<p>&#8211;DA<br />
PS. I seem to have ended up on the spamers-list for this blog. Is that because I comment too much? :P DS</p>
]]></content:encoded>
	</item>
</channel>
</rss>

