|
Unlimited Tutoring & Homework Help
|
Simultaneous Equations
Consider a linear equations in two variables , say, 3x - 2y = 5. It has an infinite number of solutions, some of these are x = 0, Consider a linear equations in two variables , say, 3x - 2y = 5. It has an infinite number of solutions, some..
Consider a linear equations in two variables , say, 3x - 2y = 5. It has an infinite number of solutions, some of these are x = 0, Consider a linear equations in two variables , say, 3x - 2y = 5. It has an infinite number of solutions, some..Methods to Solve Simultaneous Equations
Simultaneous Equations - Consider a linear equations in two variables , say, 3x - 2y = 5. It has an infinite number of solutions, some of these are x = 0, Consider a linear equations in two variables , say, 3x - 2y = 5...
Simultaneous Equations - Consider a linear equations in two variables , say, 3x - 2y = 5. It has an infinite number of solutions, some of these are x = 0, Consider a linear equations in two variables , say, 3x - 2y = 5...   Homogeneous Linear Systems with Constant Coefficients: Solution via Matrix Eigenvalues (Real and Distinct Case). View the complete course: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
"Problems on simultaneous equations with three variables" Questions & Answers
From   Yahoo Answers
Question : Write a programme, using matrices, to solve simultaneous equations. You need only solve problems with two or three variables; For example:
Two variables:
3x + 4y = 2,
7x - 3y = 5.
Three variables:
x - 2y + 3z = 6,
2x - y + z = 3,
3x + y - 2z = -1.The trick is to input the problem as a matrix problem, and then use the inverse of the matrix to solve it. In C programming language
Answer : #include
#include
using namespace std;
#define rep(i, n) for((i) = 0; (i) < (n); (i)++)
#define rep2(i, k, n) for((i) = k; (i) < (n); (i)++)
void f21();
int n;
double mat[100][100];
int main()
{
while(true)
{
cin >> n;
if(!n) break;
memset(mat, 0, sizeof(mat));
f21();
}
return 0;
}
void f21()
{
cout << "****************************************" << endl;
cout << "* INVERSE OF MATRIX *" << endl;
cout << "****************************************" << endl;
cout << "ORDER OF THE MATRIX: " << n << endl;
cout << "ENTER ELEMENT ROW-WISE" << endl;
int m = 2*n;
int i, j, k;
rep(i, n) {
rep(j, n) {
cin >> mat[i][j];
cout <<"\t";
printf("%5.3lf", mat[i][j]);
}
rep2(j, n, m) {
if(i == (j-n)){
mat[i][j] = 1;
continue;
}
mat[i][j] = 0;
}
cout << endl;
}
cout << endl << "INVERSE MATRIX: " << endl;
double pivot, comm;
rep(i, n) {
pivot = mat[i][i];
if(mat[i][i] == 0){
cout << "DIVISION BY ZERO." <More from Yahoo Answers
Answer : #include
Result
Pages   :     1     2     3     4     5     6     7     8     9     10     11

