sharing everything

lapack sgetrs tutorial

I have a problem to solving system linear equation Ax=b using lapack. I am planned to use sgetrs subroutine in lapack to solving system linear equation Ax=b.

sgetrs descriptions is a subroutine to Solves a system of linear equations with an LU-factored square coefficient matrix, with multiple right-hand sides. So, we need to process our data with LU-factored before use sgetrs lapack.

I have create a C/C++ code to give tutorial how to call sgetrs lapack from C/C++ code. I have compared the result from this sgetrs lapack with Matlab and give the same result. Please check this code below (call sgetrs lapack from C/C++) :

We can compile this code (call sgetrs lapack from C/C++) using command :

Sample output after running this code (call sgetrs lapack from C/C++) :

My name is Toto Sugito. This is my notes when I try something. Maybe, this is NOT THE BEST SOLUTION for your problems. If you have other method or idea that better with my post, please share in this blog. Thank for visiting my site.

No Comments Yet

Leave a Reply

Your email address will not be published. Required fields are marked *



Bloggers - Meet Millions of Bloggers