On Wed, Oct 26, 2011 at 9:13 AM, Robert Klemme
<shortcutter / googlemail.com> wrote:
> On Tue, Oct 25, 2011 at 10:40 PM, juman s. <jsalih75 / yahoo.ie> wrote:
>> a=[["doc1",["hi","bye","guy"],[],[],[]],["doc2",["bye","now","is","hi","hi","hi"],[],[],[]],["doc3",["bye","now","is","hi","hi","hi","why","go","guy"],[],[],[]]]
>>
>> i have this array i'd like to multiply the 2nd inner array with the 3rd
>> inner array and fill the 4th inner array with these results but i don't
>> know how to do it. by the way the 2nd and the third inner array are of
>> type float.
>> anybody ca help please?
>> and thanks in advance:)
>>
>> a.each{
>> |x|
>>  ®
>> |y|
>>  ®   
>>
>>  
>>
>>
>>  
>> }
>>
>> and the error is
>> tester.rb:50: undefined method `each' for 1:Fixnum (NoMethodError)
>>  
>>  
>>  
>>  
>
> Why not use any of these: http://raa.ruby-lang.org/search.rhtml?search=matrix ?

PS: And there's also http://rdoc.info/stdlib/matrix/1.9.2/frames in
the standard library.  For fast math there's also narray gem.

Cheers

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/