Spectral or peak alignment
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Curious Mind
il 9 Lug 2017
Risposto: Kateryna Artyushkova
il 19 Ott 2018
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165898/image.jpeg)
Hello: I have two spectra, Spectrum A and Spectrum B. Spectrum A is the reference spectrum and spectrum B is one I just collected. I'm trying to match spectrum B with the reference spectrum A. However, I realized that the peaks in B are a bit shifted.
My question is how do I correctly align B to the reference A using matlab?
How do I correct for the peak shifts in my spectrum so that they align correctly to the reference spectrum using matlab or any other program or algorithm?
Thank you.
2 Commenti
dpb
il 9 Lug 2017
'Pends on what kind of shift you're talking about...is it simply a phase shift of the whole spectrum or a shrinkage/expansion?
Attach at least figure; data would be better...
Risposta accettata
Kateryna Artyushkova
il 19 Ott 2018
Maybe this will work: https://www.mathworks.com/matlabcentral/fileexchange/15392-shifts-set-of-spectra-to-a-new-maximum-position?s_tid=prof_contriblnk
0 Commenti
Più risposte (2)
Star Strider
il 9 Lug 2017
One option is to use the Signal Processing Toolbox alignsignals (link) function. That is not its intended use, but it could work. (It is relatively recent. The documentation does not say when it was introduced.)
14 Commenti
Image Analyst
il 9 Lug 2017
Look up xcorr in the help and see this entry "Find a Signal in a Measurement". It says "You receive some data and would like to know if it matches a longer stream you have measured. Cross-correlation allows you to make that determination, even when the data are corrupted by noise."
and then it gives an example. Try it.
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!