Get slope from the plot profile data

Dear all,

I usually edit the code from the recorder to complete my macro and found that all the function in the plot profile will not be recorded. Can anyone tell me how to get the slope from the plot profile in an ijm-language macro? I am highly appreciating your help.

Sincerely,
Peggy

This macro might help to do a fit:

https://imagej.nih.gov/ij/macros/examples/CurveFittingDemo.txt

See also ( Fit Functions):

https://imagej.nih.gov/ij/developer/macro/functions.html#F

Here an older threrad:

http://imagej.1557.x6.nabble.com/Macro-Problem-Fit-doFit-quot-Gaussian-quot-X-Y-td5000893.html

Here’s a short macro that implemants FeatureJ’s Derivative function (the the edges function. You may need to correct all the quotes as this site sometimes changes them to curley quotes when you copy the text from this window.

run(“Close All”);
open("");
makeRectangle(11, 8, 528, 57);
run(“Crop”);
rename(“wavestrip”);
run(“FeatureJ Edges”, “compute smoothing=1.0 suppress lower= higher=”);
selectImage(“wavestrip”);
run(“Montage to Stack…”, “columns=”+5+" rows=1 border=0");
rename(“wavesstack”);
run(“FeatureJ Edges”, “compute smoothing=1.0 suppress lower= higher=”);
selectImage(“wavestrip”);
run(“FeatureJ Derivatives”, “x-order=1 y-order=1 z-order=0 smoothing=1.0”);
run(“Tile”);
exit();

Use it with this image;
image

p.s. the call to plot profile shows up in the recorder if you select it from the Analyze drop down.rather than typing k