cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Element by element Multiplication

aasper
1-Newbie

Element by element Multiplication

I have 2 matrices that I need to multiply in the same way we normally add matrices.

a=(1,3,5)

b=(2,4,6)

a*b=(2,12,30)

How can I get this result? I want to multiply the first row with the first row and make that the new first row, etc.

2 REPLIES 2
StuartBruff
23-Emerald III
(To:aasper)

Look up the "vectorize" operator in your version of Mathcad.  The vectorize operator is intended for precisely this kind of situation. 

Stuart

(I would have posted an example, but I'm without Mathcad at the moment)

StuartBruff
23-Emerald III
(To:StuartBruff)

Here's an example in Mathcad 15 ...

Stuart

Announcements

Top Tags