matrix multiplication

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • glitchized
    New Member
    • Feb 2008
    • 1

    #1

    matrix multiplication

    hi, can anyone help me with matrices multiplication function. how do i go about doing it if i wanna do multiplication of 2 square matrices? i'll first take in the size of the matrix

    example:
    cin >> 3

    is there any solution/help to do a dynamic multiplication? ?
  • mkborregaard
    New Member
    • Sep 2007
    • 20

    #2
    There are several ways of doing matrix multiplication in c++, depending what your need is. You can program it from scratch - then you need a data structure to hold your matrix (e.g. an array[][] or a std::vector<std ::vector<double > >), and then work from there. This is easiest and probably best if you just want to play with it.
    There are also several class libraries available on the internet that provides pre-programmed functions and data structures for doing matrix work, including Blitz++, MTL, or the matrix capabilities of the Gnu Scientific Library. There is also a MATLAB library out there that lets you use MATLAB-like code directly in C++.
    No matter which way you do it though, it is going to cost you some work to get it running.

    Comment

    Working...