PDA

Click to See Complete Forum and Search --> : Linear algebra package


jskog
Feb 20th, 2004, 07:11 AM
Hello everybody.

I am wondering if you know if there is something like a package of linear algebra functions available for VB?

I could need something to solve equation systems like
Ax=b
without having to calculate the inverse of A explicitly, similar to how you do it in Matlab:
x = A\b

I could also need a function calculating the null space matrix of a general matrix A.

Of course I could start implementing these things by myself, but it is quite tedious and there are really many special cases that might come up. So I'd be really happy if anyone knows if there is anything like this allready available.

Thanks in advance!
/Johan

jemidiah
Feb 20th, 2004, 06:11 PM
In f(x) = l(c) [c is a known constant], you can use the Newton approximation on f(x) - l(y) = 0; ex. 12x = 15, 12x - 15 = 0, Newton it (it uses derivatives to approximate the zero. The derivative can be roughly calculated other ways). For the null space matrix one, I've never heard that jargon. Could you elaborate?

jskog
Feb 24th, 2004, 11:22 AM
Jemidiah, it seems like you are not talking linear algebra at all. Let me explain what I mean:

When I say that I want to solve an equation system Ax=b, then x and b are vectors (in my case x contains about 100 unknowns) and A is a 100x100 matrix.
Since this is a system of linear equations, calculating derivatives are not at all relevant in this case.


For a general equation system (non-quadratic A)
Ax=b
the nullspace matrix of A is defined as the matrix, containing as it's columns, the x basis vectors satisfying
Ax=0
The null space matrix is not in any way unique, since the basis vectors are not unique. But I just need a function returning an arbitrary null space matrix.


Anyway, is it someone out there that knows if there is a LINEAR ALGEBRA PACKAGE available for Visual Basic, similar to the package LAPACK to FORTRAN????

jskog
Feb 24th, 2004, 11:53 AM
I have been looking around, and there is one serious but expensice product (http://www.centerspace.net/products.php?page=4) that seems to be able to perform the calculations that my code is supposed to do. However, the cost is $495 + $495 = $990, which is way out of my budget.

It also seems like this is basically a nice interface to the FORTRAN package LAPACK (http://www.netlib.org/lapack), which highly advanced AND free!

My conclusion is that the best thing I can do is to use the FORTRAN functions, or maybe even better the
C-version, for Windows (http://www.netlib.org/clapack/CLAPACK3-Windows.zip). Might even be that this one is for VC++, I must check this out further.

So now my question to you is, how do I use FORTRAN or C-functions in VB.NET? (Guess I'll find that in another forum???)