Answered # Library to solve matrix determinant c++

Lerner 582 ArkM 1,090 Discussion Starter 35nando Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...

0

Hint: google search using C++ matrix determinant. It provided 12,000 hits. One of them, probably early on in the list, probably/may have something to help.

0

For example, download free **Matrix TCL Lite 1.13** by Techsoft:

http://www.techsoftpl.com/matrix/download.htm

(it's not a recommendation, I never use this library but it's compact and simple;) ).

Comment 5 lines of abs definitions in downloaded matrix.h:

```
/* Do that, you can't compile it with VC++ when <complex> included
#if ( defined(__BORLANDC__) || _MSC_VER ) && !defined( __GNUG__ )
inline float abs (float v) { return (float)fabs( v); }
inline double abs (double v) { return fabs( v); }
inline long double abs (long double v) { return fabsl( v); }
#endif
*/
```

Now

```
#include <complex>
using namespace std;
#include "matrix.h"
typedef complex<double> Complex;
typedef math::matrix<Complex> CMat;
int main()
{
CMat m(2,2);
m(0,0) = Complex(0,1);
m(0,1) = m(1,0) = 0.0;
m(1,1) = Complex(0,1);
cout << m.Det() << endl;
return 0;
}
// prints (-1,0)
```

Read package manual in pro_doc directory...

0

see...Cramers rule...then u can create your own library...

Cramer's rule is useful to fing solution of a system of linear equations, not solving determinant.

For example, download free

Matrix TCL Lite 1.13by Techsoft:

http://www.techsoftpl.com/matrix/download.htm ...

Thanks, that library is simple and solves determinants quickly :)

This question has already been answered. Start a new discussion instead.

Recommended Articles

Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.

This is the result of previous question answered :

code for the listbox - datagridview interaction

At the top of the code ...

the function that I created to find the ...