[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01852] Re: Matrix Multiplication in Ruby

From: matz@... (Yukihiro Matsumoto)
Date: 2000-03-15 17:41:54 UTC
List: ruby-talk #1852
Hi,

In message "[ruby-talk:01843] Matrix Multiplication in Ruby"
    on 00/03/15, "Dat Nguyen" <thucdat@hotmail.com> writes:

|I remmeber having seen three code samples in Perl, Tcl & Python to multiply 
|two matrices and store the result into a third matrix.
|
|How would the code in Ruby be?

Something like:

  require 'matrix'

  m1 = Matrix[[1,2,3],[4,5,6]]
  m2 = Matrix[[5,6],[10,2],[4,4]]
  m3 = m1*m2

							matz.

In This Thread

Prev Next