- Load the experimental data: You can do this by using the ‘load’ function.
- Load the LIBS dataset: You can load the LIBS database into MATLAB using the load command depending upon the format of file.
- Preprocess the datasets: Preprocess the datasets to make any necessary changes if required to remove noise or perform adjustments.
- Iterating through database: Iterate through the LIBS database for each element to find the peak positions for the required features and compare it with the corresponding experimental data. You can store them in a new column or as a new variable. You can use functions like ‘max’, ‘findpeaks’ for finding the peaks.
Script for automatic assignment of peaks using a database
조회 수: 1 (최근 30일)
이전 댓글 표시
I am working on LIBS for identification of elemental composition. I am doing this by comparing my experimental data with a LIBS database. However, I have been doing this by plotting each of the element in the database with my experimental data. I need help on writing a script that can automatically assign peaks based on the comparison for all element at once to save time. Can anyone guide me on writing the script please?
Hint: LIBS database consist of individual spectrum of Intensity vs wavelength for many elements based on choice while experiment data is just a single spectra of intensity vs wavelength.
댓글 수: 0
답변 (1개)
Shivansh
2023년 8월 29일
Hi Doyinsola,
I have provided the basic outline of the script which can be used to gain the above results. I have assumed that you have the datasets in a format accepted by MATLAB such as ‘.csv’ or ‘.xlsx’.
for i = 1:num_elements
Max_Val= max(DataSet(i,Col_Num));
Col_to_compare(i) = Max_Val;
end
num_elemnts: Total number of elemnts.
Col_Num = Column number of interest.
Col_to_compare = Column storing values for comparison purposes.
5. You can analyse and visualise the results now by generating plots or performing statistical calculations.
Links to the documentations for the functions
참고 항목
카테고리
Help Center 및 File Exchange에서 Measurements and Feature Extraction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!