<< linalg_dgemm blaslapack linalg_dsyev >>

linalg >> linalg > blaslapack > linalg_dgesv

linalg_dgesv

Solves A*X = B for real equations.

Calling Sequence

X = linalg_dgesv ( A , B )

Parameters

A :

a n-by-n matrix of doubles (real)

B :

a n-by-p matrix of doubles (real)

X :

a n-by-p matrix of doubles (real), the solution of A*X = B.

Description

Calls BLAS/DGESV.

Examples

// One RHS in the linear system of equations
A=  [
1 2
3 4
];
e = [5;6];
b = [17;39];
x = linalg_dgesv(A,b);
// 3 RHS in the linear system of equations
A=  [
1 2
3 4
];
e = [5,1,2,3;6,2,3,4];
b = [17,5,8,11;39,11,18,25];
x = linalg_dgesv(A,b);
// A singular system
A=  [
1 2
1 2
];
b = [-66;-74];
x = linalg_dgesv(A,b)

Authors


Report an issue
<< linalg_dgemm blaslapack linalg_dsyev >>