histogram and plot at the same
19 次查看(过去 30 天)
显示 更早的评论
Hello,
Please help. I want to draw a plot of a function (the ones we have when we use plot()) and a histogram (with the bins) in the same graph (superimposed on each other).
Any ideas on how to achieve this?
Thanks
0 个评论
采纳的回答
Sean de Wolski
2015-1-13
histogram(randn(1000,1))
hold on
plot(-6:6,abs(sin(-6:6)*100))
In R2014b. In R2014a and earlier use hist() instead of histogram.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!