i want to set x-axis to be in Pico seconds , how to do that
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
v![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1216112/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1216112/image.png)
0 Commenti
Risposte (1)
Image Analyst
il 2 Dic 2022
Multiply your x by 10^12.
bar(x*1e12, y, 1);
xlabel('Time Difference in picoseconds');
3 Commenti
Image Analyst
il 2 Dic 2022
I said to use bar, not histogram. If the data is a histogram, then use histcounts to get the y data (counts) or else pass 'Edges' in to histogram
x = (tin-tex)*(-1.433426304e-12)
[counts, edges] = histcounts(x);
ylabel('number of Occurrences', 'FontSize', 15);
xlabel('Time Difference in picoseconds' 'FontSize', 15);
bar(edges(1:end-1), counts);
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
Vedere anche
Categorie
Scopri di più su Annotations 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!