- 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 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Shivansh
il 29 Ago 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
Vedere anche
Categorie
Scopri di più su Measurements and Feature Extraction in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!