how do i plot (histogram and normal plot) Uniform distribution for uniformly distributed height of a building between 10 to 200?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sudeep Gyawali
el 12 de Oct. de 2020
Comentada: Image Analyst
el 12 de Oct. de 2020
height of building uniformly distributed
0 comentarios
Respuesta aceptada
Image Analyst
el 12 de Oct. de 2020
Sounds like homework so we can't just give you our code to hand in as your own. So look at this example from the help
% Generate a 10-by-1 column vector of uniformly distributed numbers in the interval (-5,5).
r = -5 + (5+5)*rand(10,1)
Adapt the interval from (-5, 5) to (10, 200) in the obvious way (make -5 10 and make the +5 to be 200). Then just pass r into the histogram() function.
2 comentarios
Sudeep Gyawali
el 12 de Oct. de 2020
Editada: Image Analyst
el 12 de Oct. de 2020
Image Analyst
el 12 de Oct. de 2020
OK. Though that's a funny way to get the histogram (using a double for loop) even if you are doing it manually. You know that 'Rayleigh' is an option for the random() -- not rand() -- function, right?
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!