Hi, AFAIK you should never compute the inverse when trying to solve Ax = b. Either user LU decomposition or for your tridiagonal matrix (I'm guessing non-symmetrical) use the Thomas algorithm. A description of the algorithm together with an implementation in C can be found here: http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm Hope that helps, Cosmin nisha kannookadan wrote:
Hi everybody
I need to solve a linear system Ax = b, where A is a tridiagonal matrix, is there an easy way to do it?
I programmed an algo, which computes the inverse of the tridiagonal matrix with the usmani-algo and uses prod then, but this is quite time intense.
I want to use the lapack bindings, but I dont get along with it. Im bit confused, if I need to install something additional to it, the way I tried out gesv, its not working and I get error msgs. I searched through out the www, but its hard to find good info.
If somebody has already the code to solve linear equations with lapack, I would thankful, if he could post it here.
Thank you Nisha K _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/