Plotting histogram with user specified count
10 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Image Analyst
2023-6-12
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');
更多回答(1 个)
Samay Sagar
2023-6-12
You can use the readmatrix function to read csv files. You can plot histogram using the array returned by the readmatrix function.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!