Generate random numbers matrix in OpenCV
<p>I want to know how can I generate a matrix of random numbers of any given size, for example <code>2x4</code>. Matrix should consists of signed whole number in range, for example <code>[-500, +500]</code>. </p>

<p>I have read the documentation of <a href="http://docs.opencv.org/2.4/modules/core/doc/operations_on_arrays.html#rng" rel="noreferrer">RNG</a>, but I am not sure on how I should use this. 
I referred too this <a href="https://stackoverflow.com/questions/19037187/opencv-randn-generator-like-in-matlab">question</a> but this did not provide me the solution I am looking for. </p>

<p>I know this might be a silly question, but any help on it would be truly appreciated. </p>