I have a number of reflectance spectra with a consistent wavelength range (350-2500nm) (x). The reflectance (y) shows an overall convex shape that I want to fit for each spectrum, similar to a baseline. Here are two examples
Spectrum 1:
Spectrum 2:
Ideally the fitted curves would look something like this:
Spectrum 1 ideal:
Spectrum 2 ideal:
I have tried the "continuum removed" function: "CR = continuum_removed(v,'Sampling',x,'Plots','yes')
The result of which returned the error: "Error using horzcat Dimensions of matrices being concatenated are not consistent.
Error in continuum_removed (line 56) x_ext = [x(1)-small x x(end)+small];
Error in Untitled3 (line 12) CR = continuum_removed(v,'Sampling',x,'Plots','yes');"
Any help in fitting a curve would be greatly appreciated.
Best Answer