I am writting a program in Visual Studio using MFC dialog based application. I have 5 matrix in my program where I have to add two of them and multiply other 2 of them and then subtract the result of multiplication from the summed value to get the 5th matrix. Some time I have to square the summed matrix also so it is quite laborious to write the full code... So one way is to write the code straight forward in C++ using array...But if I want to multiply two matrices or sum them directly as can be done in MatLab, is it possible in C++? If yes then how?
Asked
Active
Viewed 630 times
4 Answers
3
Boost has a good library for linear algebra: Boost.uBLAS.
It includes a convenient matrix class, as well as built in matrix arithmetic operations.

Charles Salvia
- 52,325
- 13
- 128
- 140
-
uBLAS is indeed great and it is pretty easy to use it in conjunction with a LAPACK library, making it quite useful if you need to perform high-performance matrix computations. – James McNellis Jan 20 '11 at 07:22