Hi, this is probably a really simple problem but I'm trying to multiply vectors by a matrix, using entry-wise multiplication.(adsbygoogle = window.adsbygoogle || []).push({});

For example, I want to do something like this:

a = [1 2 3 4]

b = [5 6 7 8]'

c = [1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16]

d = a.*b.*c

So that d is a 4x4 matrix and for example:

d(1,2) = 1*5*1 (etc.) So that each entry in the first row of d will be multiplied by b(1) and the corresponding a entry. Does this make sense? Anyway, is this possible?

Thanks!

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matrix .* vector?

**Physics Forums | Science Articles, Homework Help, Discussion**