Hi Everyone

I am trying to multiply a multidimensional 13*2560 (13 rows and 2560 coloumns) with 1*2560 (1 row and 2560 coloumns).

But matlab is giving error that matrix dimensions is nit match

For example as for simplest example

A=[1 2 3 4 ; 5 6 7 8]; 2*4 array

>> B=[11 22 33 44 ];1*4 vector

I want first row of A get multiplied with B and give its mean as a output then same for other row.

weighted_mean = mean(B.*A)

Please help

Thanks in advance

## Best Answer