Skip to main content
2-Explorer
September 2, 2015
Solved

Similar to vector matrix product, but different…

Hi, I don’t know what it is called, but I am looping for this functionality:

Give a vector with the same height as a matrix, find the matrix who’s row values are the matrix row values multiplied by the row value in the vector.

See attached image for a clearer explanation.

Is there an easy way to do this in MathCAD? I have found a work around, but it is not elegant.

Thanks

Oliver

RichardJAnswer
19-Tanzanite
September 2, 2015

You can do it in a small program

11 replies

23-Emerald I
September 2, 2015

Not too hard

Translate
oguest2-ExplorerAuthor
2-Explorer
September 2, 2015

Hi Fred,

Thanks for that. Very neat.
I was doing something similar in my work around, that involved using a loop. Its still a few lines though.
Is there no way to do this in one line?

Thanks

Oliver

Translate
23-Emerald I
September 2, 2015

One line?  Sure! 

Translate
Werner_E
25-Diamond I
September 2, 2015

Whats the reason you want it to be done in just one line/operation?

Because you need it multiple times in your sheet?

Then I would suggest you turn it into a user defined utility function:

Translate
oguest2-ExplorerAuthor
2-Explorer
September 3, 2015

Werner, that is fantastic!

Yes, I need to do it many many times in the same document.

This is a perfect solution and will make it so much simpler, thank you!

Translate