Signal integration
Signal integration
I started using your amazing program spinach for simulating PHIP spectra. Everything is working fine, but I got stuck at one point. I don’t know whether it is due to my lack of knowledge of Matlab or spinach itself. However, my aim is to determine the individual integrals or peak heights of the antiphase spectra. For that I would like to extract either the signal function or its FT in order to go on working with it.
Re: Signal integration
To integrate the peaks, it is probably best to use Matlab’s built-in trapz() function – it calculates numerical integrals using the trapezium method. Plot your spectrum without the axis, i.e.
plot(real(spectrum))
This will make Matlab use point numbers as the axis. Find out what the integration interval is, for example from point A to point B, then call
trapz(real(spectrum(A:B)))
That would give you the integral.
plot(real(spectrum))
This will make Matlab use point numbers as the axis. Find out what the integration interval is, for example from point A to point B, then call
trapz(real(spectrum(A:B)))
That would give you the integral.