How to obtain an absorption spectrum from a derivative spectrum?

6 views (last 30 days)
I have a derivative spectrum represented with 128 points and need to integrate the spectrum to get absorption spectrum with 128 points. How to do this?

Accepted Answer

Star Strider
Star Strider on 9 May 2016
See if the trapz or cumtrapz functions will do what you want.
  7 Comments
Walter Roberson
Walter Roberson on 10 May 2016
When I try with
a = [0 0 8 0 -8 0 7 0 -7 0 9 0 -3 0]
then
plot(cumtrapz(a))
gives me pretty much the shape you are looking for.
The cumtrapz result you are seeing would be consistent with the first negative not being sufficient to balance out the first positive. If you go up but do not come down all the way, you do expect to be left part way up.
dsp
dsp on 16 Nov 2016
@walter, pls add your answer spearatly, so I can accept it.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!