How can we plot a random number ina bar graph

10 ビュー (過去 30 日間)
rishika yadav
rishika yadav 2020 年 10 月 4 日
回答済み: Walter Roberson 2020 年 10 月 4 日
How we plot random 20000number between -5 to 10 in bar graph.

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 10 月 4 日
r = rand(1,20000) * 15 - 5; %random -5 exclusive to +10 exclusive
This assumes you are looking for continuous numbers. If you are looking for integers, then use randi() to generate the numbers.


Find more on 2-D and 3-D Plots in Help Center and File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by