Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matrix vector multiplication!

  1. Aug 7, 2013 #1
    I have a problem with something that should be very simple,I do not no if it is programming issue or my ignorance.
    If I have matrix c(5,5)
    3 0 0 0 0
    1 2 0 0 0
    0 1 2 0 0
    0 0 1 4 1
    0 0 0 1 2
    and vector b(1,2,3,4,5)

    c*b=a

    a=(3,5,8,24,14)
    FORTRAN MATMUL
    C=MATMUL(B,A)

    Correct?
     
  2. jcsd
  3. Aug 7, 2013 #2

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    a=(3,5,8,24,14)

    That is correct.

    C=MATMUL(B,A)
    I don't know Fortran at all, but here you are multiplying B and A to get C. This is different from what you said earlier (multiplying C and B to get A). I don't know that MATMUL does with two vectors, but you will either get a number (the inner product) or a matrix (but not the one you expect).

    Did you mix up your naming, or ... ?
     
  4. Aug 7, 2013 #3

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

  5. Aug 12, 2013 #4

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Perhaps here he used it correctly!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Matrix vector multiplication!
  1. Matrix multiplication (Replies: 1)

  2. Matrix multiplication? (Replies: 5)

  3. Matrix multiplication (Replies: 1)

  4. Matrix multiplication (Replies: 14)

Loading...