changing x values when using histcounts
2 views (last 30 days)
Show older comments
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/278282/image.jpeg)
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')
0 Comments
Answers (0)
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!