Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiplication of Matrix and vector

Status
Not open for further replies.

sanlight

Mechanical
Joined
Apr 25, 2007
Messages
11
Location
US
Hello all,
I am new to mathcad, I have a matrix (ixj) and a vector (ix1). I need to multiply each ith row of the matrix and the vector. Eg. My first row is (2,6,1) and second row is (1,2,3) and vector is 2,1,3. My resultant matrix first row should be 4,6,3 and second row should be (2,2,9)...and so on.
Thanks a lot
 
Isn't it just Matrix*Vector, resulting in a 2-element vector?

TTFN

FAQ731-376
 
Hello IRStuff,
Matrix*vector is only 1 - element vector (not a matrix)
 
Sorry, I didn't read your post carefully enough. You need to use indices, i:=0;2, j:=0;1

Ri,j = Mi,j*Vi


TTFN

FAQ731-376
 
You don't even need indices. If you have defined your matrix (A) and vector (V), just store your result in vector B=A*V. Thus, if A is (2x2) and V is (2x1) the resulting vector B is 2x1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top