- 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 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Shivansh
el 29 de Ag. de 2023
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
Ver también
Categorías
Más información sobre Measurements and Feature Extraction en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!