I have a constantly changing random variable that contributes to producing an output. Here is the code:
r = ;
v = 10;
g = 9.81;
theta = (pi/2)*rand;
r(i) = 2*sin(theta)*cos(theta)*(v^2)/g;
Now I know how to plot the normalized function and RV as a normal plot but I want the plot to be a histogram. How can I do this for both the RV theta and the output r to get the probability density function?