MATLAB: Matrix playing

matrix multiplication

Hi all
i have
w1 =
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0002 1.0000 1.0001 1.0000 1.0001
I want a new matrix with product of all terms in each 2×2 matrix in w1
Eventually, I need a 1×3 matrix.
If I use prod(w1), only the columns get multiplied.
Can anyone help please

Best Answer

blkproc(w1,[2 2],@prod)