From: Todd Benson Date: 2007-10-20T06:48:28+09:00 Subject: Re: Create matrix with random numbers On 10/19/07, Jason Bornhoft wrote: > I would like to start evaluating Ruby's capabilities in processing large > linear systems and matrices and I would like to know if there is a > simple way to 'randomly' populate various matrices regardless of size or > type. > > Any help, comments, anything is greatly appreciated! Not sure what you want exactly, but, maybe... require 'matrix' a, b = 2, 3 m = Matrix[*(Array.new(a) {Array.new(b) {rand}})] Todd