How to obtain an absorption spectrum from a derivative spectrum?
6 views (last 30 days)
Show older comments
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?
0 Comments
Accepted Answer
Star Strider
on 9 May 2016
See if the trapz or cumtrapz functions will do what you want.
7 Comments
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.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!