Joseph Peralta wrote:
   yuvmat
> 0.299  0.587 0.114
> _0.147 _0.289 0.436
> 0.615 _0.515  _0.1
>
> Along with this matrix, I have some data in an nx4 format. I would
> like to process this data by removing the last element and then
> multiplying each row vector by the matrix, and return an nx3 list
> of the resultant vectors.

Given the one row matrix 1 1 1 1 would you want a result of
1 5.55112e_17 _2.77556e_17 or a result of 0.767 _0.217 0.45?

In other words, do you want (yuvmat ip data) or (data ip yuvmat)
where ip is inner product?

Here's a couple implementations for each option:
(yuvmat ip data)
   yuvmat +/ .*"2 1 }:"1 data
  (yuvmat,.0) +/ .*"2 1 data

(data ip yuvmat)
   (}:"1 data) +/ .* yuvmat
   data +/ .* yuvmat,0

-- 
Raul

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to