Login  Register

Re: "user-defined" curve fitting in a macro

Posted by Wayne Rasband on Sep 03, 2009; 12:43am
URL: http://imagej.273.s1.nabble.com/user-defined-curve-fitting-in-a-macro-tp3691312p3691314.html

On Sep 2, 2009, at 8:10 PM, David Goldenberg wrote:

> Hi,
>    I would like to include in a macro a curve fit to a non-standard
> function, as implemented in the Analyze>Tools>Curve Fitting ...  
> command.
> To be clear, I want to include a specific function coded in the macro,
> not prompt the user for a function.
>
> I have figured out how to code curve fits to the pre-defined  
> functions,
> but I haven't found any documentation or examples that would allow  
> me to
> define a function within a macro.
>
> Any help would be greatly appreciated.

Use the Fit.* macro functions described at

    http://rsbweb.nih.gov/ij/developer/macro/functions.html#Fit

Here are some examples:

    http://rsb.info.nih.gov/ij/macros/examples/CurveFittingDemo.txt
    http://rsb.info.nih.gov/ij/macros/examples/UserDefinedCurveFits.txt
    http://rsb.info.nih.gov/ij/macros/examples/RodbardSigmoidFit.txt
    http://rsb.info.nih.gov/ij/macros/examples/ 
PlotSigmoidDerivatives.txt

-wayne