<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242395</link>
    <title>MATLAB Central Newsreader - Double exponential decay fit</title>
    <description>Feed for thread: Double exponential decay fit</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>Wed, 18 Feb 2009 04:21:01 -0500</pubDate>
      <title>Re: Double exponential decay fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242395#629050</link>
      <author>Thomas </author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I was wondering if you have figured out a way of doing a double exponential equation fit in matlab&lt;br&gt;
&lt;br&gt;
Thanks &lt;br&gt;
&lt;br&gt;
&quot;Jean-Sebastien&quot; &amp;lt;newsreader@mathworks.com&amp;gt; wrote in message &amp;lt;gkl7vl$nb0$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi folks,&lt;br&gt;
&amp;gt; OK :&lt;br&gt;
&amp;gt; You have a set of data points (time,response) which correspond to a simple two exponential decay function (peak to baseline). &lt;br&gt;
&amp;gt; You feed sigmaplot10 with it and using the simple equation y=a*exp(-bx)+c*exp(-dx) it gives you a nice fit. &lt;br&gt;
&amp;gt; Now you do it in Matlab using the same data, same equation and on 2 out of 3 fit you've got a funny fit which obviously is wrong... &lt;br&gt;
&amp;gt; Question:&lt;br&gt;
&amp;gt; Does anyone can explain the decrepancy between the two softwares? why sigmaplot10 can fit a simple two exponential decay function while Matlab doesn't?&lt;br&gt;
&amp;gt; Is there any issue with the method used? If so is there an alternative to make Matlab fit this simple two eponential decay function correctly?&lt;br&gt;
&amp;gt; Thanks for your help,&lt;br&gt;
&amp;gt; JS&lt;br&gt;
&amp;gt; </description>
    </item>
    <item>
      <pubDate>Wed, 14 Jan 2009 17:39:01 -0500</pubDate>
      <title>Double exponential decay fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242395#621569</link>
      <author>Jean-Sebastien</author>
      <description>Hi folks,&lt;br&gt;
OK :&lt;br&gt;
You have a set of data points (time,response) which correspond to a simple two exponential decay function (peak to baseline). &lt;br&gt;
You feed sigmaplot10 with it and using the simple equation y=a*exp(-bx)+c*exp(-dx) it gives you a nice fit. &lt;br&gt;
Now you do it in Matlab using the same data, same equation and on 2 out of 3 fit you've got a funny fit which obviously is wrong... &lt;br&gt;
Question:&lt;br&gt;
Does anyone can explain the decrepancy between the two softwares? why sigmaplot10 can fit a simple two exponential decay function while Matlab doesn't?&lt;br&gt;
Is there any issue with the method used? If so is there an alternative to make Matlab fit this simple two eponential decay function correctly?&lt;br&gt;
Thanks for your help,&lt;br&gt;
JS</description>
    </item>
    <item>
      <pubDate>Wed, 14 Jan 2009 18:10:04 -0500</pubDate>
      <title>Re: Double exponential decay fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242395#621577</link>
      <author>Aaron Callard</author>
      <description>&quot;Jean-Sebastien&quot; &amp;lt;newsreader@mathworks.com&amp;gt; wrote in message &amp;lt;gkl7vl$nb0$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi folks,&lt;br&gt;
&amp;gt; OK :&lt;br&gt;
&amp;gt; You have a set of data points (time,response) which correspond to a simple two exponential decay function (peak to baseline). &lt;br&gt;
&amp;gt; You feed sigmaplot10 with it and using the simple equation y=a*exp(-bx)+c*exp(-dx) it gives you a nice fit. &lt;br&gt;
&amp;gt; Now you do it in Matlab using the same data, same equation and on 2 out of 3 fit you've got a funny fit which obviously is wrong... &lt;br&gt;
&amp;gt; Question:&lt;br&gt;
&amp;gt; Does anyone can explain the decrepancy between the two softwares? why sigmaplot10 can fit a simple two exponential decay function while Matlab doesn't?&lt;br&gt;
&amp;gt; Is there any issue with the method used? If so is there an alternative to make Matlab fit this simple two eponential decay function correctly?&lt;br&gt;
&amp;gt; Thanks for your help,&lt;br&gt;
&amp;gt; JS&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
um it's hard to answer your question as you have not really given much information.  It's like me asking why C++ can give me answer but pearl can't.  Matlab is a programing language.  What algorithm are you using to fit the points, in matlab.  What is sigmaplot10?  &lt;br&gt;
&lt;br&gt;
My guess is that the algorithm you are using in matlab is messed up slightly.  You shouldn't blame the language for code written in it.&lt;br&gt;
&lt;br&gt;
Aaron</description>
    </item>
    <item>
      <pubDate>Wed, 14 Jan 2009 18:55:03 -0500</pubDate>
      <title>Re: Double exponential decay fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242395#621598</link>
      <author>Jean-Sebastien</author>
      <description>Hi Aaron,&lt;br&gt;
&lt;br&gt;
Thanks for your reply. Yes I realized that there isn't too much of info in my first post but thanks to have reply anyway. I have made a bit of research and found that sigmaplot (analysis software) is using the Marquardt-Levenberg algorithm to find the&lt;br&gt;
coefficients (parameters) of the independent variable(s) that give the &amp;#8220;best fit&amp;#8221;&lt;br&gt;
between the equation and the data. (Shrager, R.I. (1970). Regression with Linear Constraints: An Extension of the Magnified Diagonal Method. Journal of the Association for Computing Machinery, 17, 446-452.). &lt;br&gt;
&lt;br&gt;
So now my question is how do I found out which algorithm Matlab is using? And how can I adapt it so it would use this algorithm?&lt;br&gt;
&lt;br&gt;
Many thanks,&lt;br&gt;
Jean-Seb&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Aaron Callard&quot; &amp;lt;no.thanks@hotmail.com&amp;gt; wrote in message &amp;lt;gkl9ps$rd2$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Jean-Sebastien&quot; &amp;lt;newsreader@mathworks.com&amp;gt; wrote in message &amp;lt;gkl7vl$nb0$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi folks,&lt;br&gt;
&amp;gt; &amp;gt; OK :&lt;br&gt;
&amp;gt; &amp;gt; You have a set of data points (time,response) which correspond to a simple two exponential decay function (peak to baseline). &lt;br&gt;
&amp;gt; &amp;gt; You feed sigmaplot10 with it and using the simple equation y=a*exp(-bx)+c*exp(-dx) it gives you a nice fit. &lt;br&gt;
&amp;gt; &amp;gt; Now you do it in Matlab using the same data, same equation and on 2 out of 3 fit you've got a funny fit which obviously is wrong... &lt;br&gt;
&amp;gt; &amp;gt; Question:&lt;br&gt;
&amp;gt; &amp;gt; Does anyone can explain the decrepancy between the two softwares? why sigmaplot10 can fit a simple two exponential decay function while Matlab doesn't?&lt;br&gt;
&amp;gt; &amp;gt; Is there any issue with the method used? If so is there an alternative to make Matlab fit this simple two eponential decay function correctly?&lt;br&gt;
&amp;gt; &amp;gt; Thanks for your help,&lt;br&gt;
&amp;gt; &amp;gt; JS&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; um it's hard to answer your question as you have not really given much information.  It's like me asking why C++ can give me answer but pearl can't.  Matlab is a programing language.  What algorithm are you using to fit the points, in matlab.  What is sigmaplot10?  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; My guess is that the algorithm you are using in matlab is messed up slightly.  You shouldn't blame the language for code written in it.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Aaron</description>
    </item>
    <item>
      <pubDate>Wed, 14 Jan 2009 20:29:02 -0500</pubDate>
      <title>Re: Double exponential decay fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242395#621634</link>
      <author>Per Sundqvist</author>
      <description>&quot;Jean-Sebastien&quot; &amp;lt;newsreader@mathworks.com&amp;gt; wrote in message &amp;lt;gklce7$nl7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi Aaron,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks for your reply. Yes I realized that there isn't too much of info in my first post but thanks to have reply anyway. I have made a bit of research and found that sigmaplot (analysis software) is using the Marquardt-Levenberg algorithm to find the&lt;br&gt;
&amp;gt; coefficients (parameters) of the independent variable(s) that give the &amp;#8220;best fit&amp;#8221;&lt;br&gt;
&amp;gt; between the equation and the data. (Shrager, R.I. (1970). Regression with Linear Constraints: An Extension of the Magnified Diagonal Method. Journal of the Association for Computing Machinery, 17, 446-452.). &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; So now my question is how do I found out which algorithm Matlab is using? And how can I adapt it so it would use this algorithm?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Many thanks,&lt;br&gt;
&amp;gt; Jean-Seb&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &quot;Aaron Callard&quot; &amp;lt;no.thanks@hotmail.com&amp;gt; wrote in message &amp;lt;gkl9ps$rd2$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Jean-Sebastien&quot; &amp;lt;newsreader@mathworks.com&amp;gt; wrote in message &amp;lt;gkl7vl$nb0$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Hi folks,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; OK :&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; You have a set of data points (time,response) which correspond to a simple two exponential decay function (peak to baseline). &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; You feed sigmaplot10 with it and using the simple equation y=a*exp(-bx)+c*exp(-dx) it gives you a nice fit. &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Now you do it in Matlab using the same data, same equation and on 2 out of 3 fit you've got a funny fit which obviously is wrong... &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Question:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Does anyone can explain the decrepancy between the two softwares? why sigmaplot10 can fit a simple two exponential decay function while Matlab doesn't?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Is there any issue with the method used? If so is there an alternative to make Matlab fit this simple two eponential decay function correctly?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks for your help,&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; JS&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; um it's hard to answer your question as you have not really given much information.  It's like me asking why C++ can give me answer but pearl can't.  Matlab is a programing language.  What algorithm are you using to fit the points, in matlab.  What is sigmaplot10?  &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; My guess is that the algorithm you are using in matlab is messed up slightly.  You shouldn't blame the language for code written in it.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Aaron&lt;br&gt;
&lt;br&gt;
Hi, I think my function exp2fit could do it very well:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/21959&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/21959&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
,but sometimes with rough data you need optimization toolbox to access lsqcurvefit (which is optionally post-used in my function). If you have your own &quot;lsqcurvefit&quot; (look at file exchange) maby it will do it equally well?&lt;br&gt;
&lt;br&gt;
Also, sum of two exponentials have a lot of functional freedom to be oscillating, or decaying, when the coefficients are complex. If there is &quot;swings&quot; (with additionally large noise) in your data it may fit it to a damped harmonic oscillating function.&lt;br&gt;
&lt;br&gt;
/Per</description>
    </item>
    <item>
      <pubDate>Wed, 14 Jan 2009 22:13:02 -0500</pubDate>
      <title>Re: Double exponential decay fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242395#621690</link>
      <author>Jean-Sebastien</author>
      <description>OK,&lt;br&gt;
Sigmaplot is using the Marquardt-Levenberg algorithm to find the&lt;br&gt;
coefficients (parameters) of the independent variable(s) that give the &amp;#8220;best fit&amp;#8221;&lt;br&gt;
between the equation and the data. Interestingly, you can choose the same algorithm in curve fitting tool box under fit option. However, chossing this option still does not give me the same result. It's look like sigmaplot get that the signal decaying converge to zero while Matlab doesn't. There must be a way to set this parameter but I can't see it in the Fit options window... And I pretty much try everything in that window...&lt;br&gt;
Please, HELP!!&lt;br&gt;
Thanks,&lt;br&gt;
Jean-Seb </description>
    </item>
    <item>
      <pubDate>Thu, 08 Apr 2010 21:28:07 -0400</pubDate>
      <title>Re: Double exponential decay fit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/242395#734381</link>
      <author>William Murphy</author>
      <description>Jean Sebastian,&lt;br&gt;
Interesting that you are investigating this problem. I have a similar problem for the decay of energy in the revereberation of a room.  I have just implemented a function that should provide the dual exponential decay and a background noise level.  I conduct quite a lot of work in both SigmaPlot and Matlab.  Maybe I can provide some insight</description>
    </item>
  </channel>
</rss>

