I do this:
a = [1,2,3,4]
b = [2,3,4,5]
c = b - a
put c
I get this
answer -> [1]
I want this answer -> [1,1,1,1]
(like matrix addition/subtraction)
I tried this:
c.each {|e| c[e] = b[e] - a[e]}
but I get this answer: [1,0,0,0]
Can someone give me a correct way to do this? Thanks a lot!