changing x values when using histcounts

4 views (last 30 days)
sani
sani on 19 Mar 2020
Edited: sani on 20 Mar 2020
Hi all
I'm trying present a spectrum in matlab, and I want to calibrate the x axis to the correct values (they losts when I using histcounts I belive). the lefe peak need to be 511 and the right one in 1460.
the scipt I'm using for this spectrum is:
[X,edges] = histcounts(Ge_table.energy,16384);
Z = histcounts(Ge_energy,edges);
semilogy(X,'r')
hold on
semilogy(Z,'b')
xlabel('Energy [keV]')
ylabel('Counts')

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!