##---- HCl
HCl=csvread("HCl.csv",2,0);  # leggi lo spettro di CO, in formato CSV, salta 2 righe e 0 colonne

hclx=flipdim(HCl(:,1));
hcly=flipdim(HCl(:,2));

ixa=lookup(hclx,2500);
ixb=lookup(hclx,3100);

hclx1=hclx(ixa:ixb);
hcly1=hcly(ixa:ixb);

hcly1=hcly1-min(hcly1);
[~,ixp]=findpeaks(hcly1,"minpeakheight",0.05,"minpeakdistance",10);

ixp=sort(ixp);
ixp35=ixp(1:2:end);
ixp37=ixp(2:2:end-2);

plot(hclx1,hcly1,hclx1(ixp35),hcly1(ixp35),"or",hclx1(ixp37),hcly1(ixp37),"ob")
