All Programs are Written and Compiled in Dev C++. So, it may generate some error in case of other compilers and may need some modifications in program. Download Dev C++

Wednesday 18 March 2015

Power Method of finding Eigen Value & Eigen Vector



#include<iostream>
#include<math.h>
using namespace std;
int main()
{
    float a[10][10],x[10],c[10],ev=0,t;
    int i,j,n;
    cout<<"Enter the order of matrix= ";
    cin>>n;
    cout<<"Enter the Coefficients of matrix row-wise\n";

Tuesday 17 March 2015

Solution of System of Linear Equation by Gauss Seidal Method

#include<iostream>
#include<math.h>
#include<iomanip>

using namespace std;
int main()
{
    float a[20][20],x[20],e;
    int i,j,k,n,count=0;
    cout<<"Enter Order of equation: ";
    cin>>n;
    for(i=0;i<n;i++)
        x[i]=0;
    cout<<"Enter Coefficients of equation row-wise:\n";

Soving System of Linear Eq. By LU Factorization Method

#include<iostream>
using namespace std;
int main()
{
    int i,j,k,n,p;
    float a[10][10],l[10][10]={0},u[10][10]={0},b[10],z[10]={0},x[10]={0};
    cout<<"Enter order of matrix: ";
    cin>>n;
    cout<<"Enter the coefficients of matrix A\n";
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=n;j++)
            cin>>a[i][j];
    }

Saturday 7 March 2015

Solution of System of Linear Equations by Gauss-Jacobi's Method

#include<iostream>
#include<math.h>
#include<iomanip>
#define err 0.0001

using namespace std;
int main()
{
    float a[20][20],x[20],e;
    int i,j,k,n,max;
    cout<<"Enter Order of equation: ";
    cin>>n;
    for(i=0;i<n;i++)
        x[i]=0;
    cout<<"Enter Coefficients of equation row-wise:\n";

Solution of System of Linear Equations by Gauss Jardon Method


#include<iostream>
#include<iomanip>

using namespace std;
int main()
{
    int i,j,k,n;
    float a[10][10],x[10];
    cout<<"Enter Order of Equation: ";
    cin>>n;
    cout<<"Enter Coefficients of Equation Row-wise\n";

Solution of System of Linear Equations by Gauss Elimination Method

#include<iostream>
#include<iomanip>

using namespace std;
int main()
{
    int i,j,k,n;
    float a[10][10],x[10];
    cout<<"Enter Order of Equation: ";
    cin>>n;
    cout<<"Enter Coefficients of Equation Row-wise\n";