Hi,
I have a CSV file that has many elements and their emission line at a specific wavelength. On my graph I want to draw all these straight vertical lines for each element. The graph is Wavelength against intensity.
I currently am able to manually enter in each line using
Lyman_alpha = vline(937.06,'r','Lyman Alpha')
Where 937.06 is the wavelength and r makes the line red.
However I have over 60 emission lines to place on my graph, is there anyway this can be done with a few lines of code? I tried this but failed miserably
emissionlines =csvread('emissionlines.csv');
element = emissionlines(:, 1);
wavelengthEmission = emissionlines(:, 2);
element[i] = vline(wavelengthEmission[i],'r','element[i]') <--- Fails here
findpeaks(SFD,wavelength,'Threshold',6)
PS. I'm new to MATLAB.