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

Calculators How to perform singular value decomposition using MS Excel?

  1. Nov 3, 2016 #1
    I have a matrix of data and I want to do SVD using excel, is it possible?
     
  2. jcsd
  3. Nov 3, 2016 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    You can write a macro in VBA, or look for existing macros. I don't see a practical way to do it with formulas alone.
     
  4. Nov 3, 2016 #3
    So how to write the code for SVD in excel for mn matrix?
     
  5. Nov 3, 2016 #4

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    In the same way as in every other programming language. There are tutorials for writing macros in Excel, for VBA syntax, and there are examples of SVD code as well.
     
  6. Nov 4, 2016 #5

    jtbell

    User Avatar

    Staff: Mentor

    Have you tried a Google search for something like "excel singular value decomposition"? That search turns up results that look promising, although I haven't investigated any of them myself.
     
  7. Nov 4, 2016 #6
    I do not know the programming language but I can copy the code and use it according to the problem I have. That is why I created this thread.
     
  8. Nov 4, 2016 #7

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    So what do you expect, that others do google searches for you when you can do that as well?
     
  9. Nov 4, 2016 #8
    I expect a code. Searching in google is non-specific but asking questions here would be more helpful.
     
  10. Nov 4, 2016 #9

    Krylov

    User Avatar
    Science Advisor
    Education Advisor

    excel_svd.png

    This is what I got. It looks promising. Why don't you try to reproduce the above by performing a similar Google search?
     
  11. Nov 4, 2016 #10
    I did but I didn't find a reproducible code. For example the first link discusses the theoretical background. There is however, a code in the second link but it is only for 3/2 matrix or something. I need the code that can fit for any matrix.
     
  12. Nov 4, 2016 #11

    Krylov

    User Avatar
    Science Advisor
    Education Advisor

    What about the 4th link? It is to a journal article that received quite a few (114, apparently) citations. I checked and the article is available free of charge. Macros seem downloadable as well.

    In general you will often have to adapt (research) code that you find online to suit your own specific needs. This is something that requires a bit of practice. I am quite sure that among those links you will find code that either works straight away or only requires minor modifications.
     
  13. Nov 4, 2016 #12

    Krylov

    User Avatar
    Science Advisor
    Education Advisor

    Another option that I have applied successfully in the past, is to import the relevant Excel sheet in MATLAB and then do whatever linear algebra that you would like. (If you do not have MATLAB, you could try to export the Excel sheet to .CSV format and then use Octave instead.)
     
  14. Nov 4, 2016 #13
    What is CSV?
     
  15. Nov 4, 2016 #14

    jtbell

    User Avatar

    Staff: Mentor

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: How to perform singular value decomposition using MS Excel?
  1. MS Excel Referances (Replies: 4)

  2. MS Excel Function (Replies: 3)

Loading...