From: Harry Kakueki Date: 2008-08-05T12:09:41+09:00 Subject: Re: Matrix class: How to set a single element ? On Tue, Aug 5, 2008 at 10:18 AM, Marcio Braga wrote: > simple code: > > require 'matrix' > m1 = Matrix[[1,2],[3,4]] > > Now I need to change element (0,0) from 1 to 5. I expected something > like the command below should work: > > m1[0][0] = 5 > > ... but the error message is '[]': wrong number of arguments (1 for 2) > (ArgumentError). > > Could someone help me on that ? > Thank you > Marcio > -- > Posted via http://www.ruby-forum.com/. > > http://www.ruby-lang.org/ja/man/html/Matrix.html#Matrix.23.5b.5d.3d Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/ruby/list.html