フィルターのクリア

Find the centroid of spectra, plot and analyze!

1 回表示 (過去 30 日間)
Tusharkumar Sorathiya
Tusharkumar Sorathiya 2018 年 11 月 19 日
編集済み: Tusharkumar Sorathiya 2018 年 11 月 19 日
I have few spectra from Fiber Bragg Gratings, it is text file having 3 columns (we will consider only 1st and 3rd column, which are wavelength and power values respectively). See the attached program and files I am using currently to open spectra.
I am using the equation [ Centroid = ∑(wavelength.*power) / ∑(power) ] to find centroid of spectra.
Question-1) As shown in attached image, when I plot multiple spectra, the centroid values are outside the spectra. Are those values precise?
Question-2) If not, what is the solution and is it necessary that centroid value should come inside the spectra somewhere?
Question-3) If I get the correct values of centroid for multiple files (let say I have 5 spectra and 5 centroid value), how I can make a matrix which can find the difference of location from one centroid to another, with respect to x and y axis? for instance, 2nd centroid has 2nm shift on x axis and 5 dB shift on y axis compare to 1st centroid.
Note: Attached centroid.txt file,one can run in matlab and can use attached other two text files as sample spectra.

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Export についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by