Re: solving linear equations with LAPACK/Matlab




In article <1134824703.183866.236370@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
wakun@xxxxxxxxx writes:
>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

no !
x=A\b;

>
>(BTW, is it a right way to solve the system in matlab? Any better
>routine for that problem?)
>
>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.
>

(already done). you wonder why it works? .. because your system
administrator has installed the library which contains it all
hth
peter
.



Relevant Pages

  • Re: Finite element anaysis of Navier Stokes equation
    ... I'm finishing my dissertation on "Dispersion of Toxic Gases in Cities", in more detail I wrote a kind of CFD code for solving the NS and the advection-diffusion equations. ... I employed some of the powerful numerical solvers of MatLAB for testing. ... I wrote a code for solving Stokes equation, which is actually a simplification of the NS equations. ...
    (comp.soft-sys.matlab)
  • Re: How to choose a numerical method?
    ... i am solving a "duffing-like" 2nd order nonlinear diff. ... equation (in Matlab) ... You might consider calculating conserved entities. ... al. Geometric Numerical Integration: Structure-preserving Algorithms ...
    (sci.math.num-analysis)
  • Re: solving linear equations with LAPACK/Matlab
    ... > I am solving linear equations with Matlab and now I need to use C++ ... I am very new to LAPACK and the ... > the inverse matrix with the vector on RHS. ...
    (sci.math.num-analysis)
  • solving linear equations with LAPACK/Matlab
    ... I am solving linear equations with Matlab and now I need to use C++ ... I am very new to LAPACK and the ... the inverse matrix with the vector on RHS. ...
    (sci.math.num-analysis)
  • Re: Confused with QR decomposition and LAPACK
    ... and that the problem is with your lapack code. ... Second, you don't give any indications about what matlab produces, ... R matrices directly but can be calculated from the Output matrix. ...
    (comp.soft-sys.matlab)