Generating an array of random numbers such that the numbers at the higher indexes are greater
<p>I am trying to generate an array of random numbers such that the numbers at the higher indexes should be greater than the numbers at the lower indexes.</p>

<p>For example, an array like this: </p>

<pre><code>array = [1.5  1.7  2.4  5.6  8.5  8.9  9.2  9.5  10.2  11.3]
</code></pre>

<p>I can do this using:</p>

<pre><code>array(1:10) = 0;       % Pre-allocation
array(1) = abs(randn); % Generating a +ve rand no.
for k=2:10
    array(k) = abs(randn) + array(k-1);  % adding a +ve rand no. to the previous value 
end
</code></pre>

<p>I am looking for a better (and/or vectorized) way!</p>