Re: Curve Fitting in a macro

Posted by Wayne Rasband on
URL: http://imagej.273.s1.nabble.com/macro-to-plugin-issues-tp3703315p3703317.html

On Mar 24, 2006, at 10:18 AM, Michael Cammer wrote:

> I would love to be able to get results from a curve fit using a macro.
>
> I'm getting a list of numbers from an image that I need to fit to a
> simple exponential.  I would love to be able to do something like:
>
>   X = newArray(256);
>   Y = newArray(256);
>   Xfit = newArray(256);
>   Yfit = newArray(256);
>   //do some stuff here to load X and Y with meaningful values
>   fitCurve(X, Y, Xfit, Yfit, "exponential");
>   // do some stuff here to look at the arrays with the fits
>
> For my need, having the other results listed in the Log window is fine.
>
> Is this possible?

It will be possible when I add a fitCurve() function to the macro
language. This is on my "to do" list.

-wayne