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 - The Fusion of Science and Community**

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

# Matrix .* vector?

Loading...

Similar Threads - Matrix vector | Date |
---|---|

Eigenvectors 4x4 Matrix in Mathematica | Aug 26, 2017 |

Vandermonde Matrix and an Error Vector | Apr 25, 2013 |

Find best-fit line using matrix-vector | Jun 9, 2012 |

Construct matrix from vectors in Mathematica | Jun 2, 2012 |

Matlab- summing of vectors in a matrix | Feb 16, 2012 |

**Physics Forums - The Fusion of Science and Community**