Plotting histogram with user specified count
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ayan Sharma
le 12 Juin 2023
Commenté : Ayan Sharma
le 14 Juin 2023
I have a csv file that contains the values to be plotted with their respective counts. Unfortunately, Matlab's histogram function does not seem to have such input. Please specify any method
0 commentaires
Réponse acceptée
Image Analyst
le 12 Juin 2023
If the data file is the histogram itself, you can use bar to plot it.
xy = readmatrix(fileName);
x = xy(:, 1); % Bin values;
y = xy(:, 2); % Histogram count values.
% Plot
bar(x, y);
grid on;
xlabel('Bin Value');
ylabel('Count');
Plus de réponses (1)
Samay Sagar
le 12 Juin 2023
You can use the readmatrix function to read csv files. You can plot histogram using the array returned by the readmatrix function.
2 commentaires
Voir également
Catégories
En savoir plus sur Histograms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!