How can we plot a random number ina bar graph
5 次查看(过去 30 天)
显示 更早的评论
How we plot random 20000number between -5 to 10 in bar graph.
0 个评论
回答(1 个)
Walter Roberson
2020-10-4
r = rand(1,20000) * 15 - 5; %random -5 exclusive to +10 exclusive
bar(r)
This assumes you are looking for continuous numbers. If you are looking for integers, then use randi() to generate the numbers.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!