Is it possible to subtract the baseline of a graph from the peak using the curvefitter toolbox?

6 views (last 30 days)
Hello,
I have an image (1024x1024) which shows a laser beam (I hope it is clear in the image) and a background, and it looks like this:
What I have done so far is, choose a specific column range, and calculate the average intensity of each row, and store it in a matrix (1024x1), to plot the average intensityalong the 1024 rows like this:
I have highlighted in red, the baseline, and the unhighlighted peak depicts the laser beam.
What I want to do is, create a separate fit for the baseline (constant) and subtract it from the entire plot, to calculate the average intensity under the entire area of the peak alone. Would that be possible using the curve fitter toolbox in MATLAB? If not, are there other ways to do it?
Best regards,
Akshay.

Accepted Answer

Matt J
Matt J on 1 May 2024
Edited: Matt J on 1 May 2024
Yes, it would be possible, although for what you show it might be enough just to use polyfit.

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!