I have a plot (it is a spectra). I want to choose some peaks for fitting. How can I select a region from the Matlab plot? I want to choose some regions and do exponential fit. If I can extract the x and y values in those regions, I can fit the curves.
PS: I already have a program which calls the data and plot the spectra. As this program is written by someone else, I am not able to find where the x and y values are stored. It seems a bit complicated program. I just want to keep the same program and add some more lines or functions so that I can do my job (fitting the curve for some selected peaks)...
You can get data directly from MATLAB figure using get function. See the following example: