From: Robert Klemme Date: 2005-11-28T22:52:29+09:00 Subject: Re: 2dim array/matrix Wolfgang wrote: > Thanks for the answers, > > I think I will use for the beginning this solution: > mx = Array.new(dim_x) { Array.new(dim_y) } > > for the matrix class: > I don't understand how I can set in a matrix single values: > require "matrix" > m=Matrix[ [25, 93], [-1, 66] ] > puts m.[](1,1) > this works but when I try: > m.[](1,1)=123 > puts m > I only get an error. You probably misread the documentation. Did you try m[1,1] m[1,1] = 123 ? Kind regards robert