Re: solving linear equations with LAPACK/Matlab
- From: "Gordon" <gordon456nospam@xxxxxxxxxxx>
- Date: Sat, 17 Dec 2005 14:53:02 -0500
wakun@xxxxxxxxx wrote:
> Hi there,
> I am solving linear equations with Matlab and now I need to use C++
> instead. The size of the matrix is about 200x200 and is invertible.
> In matlab, I solve the problem as follow
>
> %Ax = b the system
> x=inv(A)*b
>
> (BTW, is it a right way to solve the system in matlab? Any better
> routine for that problem?)
Never invert. Use A\b instead.
> Anyway, for some reason, my tutor ask me to solve the same problem in
> C++. So I am going to solve it with the help of LAPACK and the C++
> wrapper (LAPACK++). However, I am very new to LAPACK and the
> documentation seems not very friendly to user. I guess I should find
> the routine to calculate the inverse of the matrix first and multiply
> the inverse matrix with the vector on RHS (b). Would you please tell
> me if I am doing right, any function in LAPACK for solving such
> system directly ? Any example for solving tridiagonal system,
> five-diagonal system and seven-diagonal system ?
>
> Thanks in advance.
.
- References:
- solving linear equations with LAPACK/Matlab
- From: wakun
- solving linear equations with LAPACK/Matlab
- Prev by Date: Numerical integration on an irregular grid
- Next by Date: Re: Numerical integration on an irregular grid
- Previous by thread: solving linear equations with LAPACK/Matlab
- Next by thread: Re: solving linear equations with LAPACK/Matlab
- Index(es):
Relevant Pages
|