Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C code for Moore-Penrose inverse.(pinv in matlab)

1,084 views
Skip to first unread message

Oded

unread,
May 31, 2004, 6:57:01 AM5/31/04
to
Hi
I am looking for C code for Moore-Penrose inverse.
Now my partner and i need to convert matlab code to a
c code as a University project and there is a use in
the pinv command in the matlab code.
Does anyone have a code for the Moore-Penrose inverse
Thanks.
Oded

Rune Allnor

unread,
May 31, 2004, 10:20:20 AM5/31/04
to
odeda...@yahoo.com (Oded) wrote in message news:<6b69bf75.04053...@posting.google.com>...

The pseudo inverse computations are based on the Singular
Value Decomposition. There is (or at least used to be) a
free numerical library (LAPACK) available where such
routines are included. I think I have seen the library
available for c/c++.

If I am not mistaken, a certain Dr Moler was involved in
developing LAPACK?

Rune

Cleve Moler

unread,
May 31, 2004, 6:43:58 PM5/31/04
to
In article <6b69bf75.04053...@posting.google.com>,

The best way to compute the Moore-Penrose pseudoinverse
makes use the Singular Value Decomposition. See the "pinv"
function in MATLAB.

A Google query for C code for SVD finds several possibilities.
Straightforward JAVA code for the SVD that could easily be
translated into C is available at:
http://math.nist.gov/javanumerics/jama/

Good luck.

-- Cleve Moler

Don

unread,
Jun 1, 2004, 10:54:51 AM6/1/04
to
Does your university have a license for Simulink, RTW, and DSP Blockset? If
so, this is simple: you can readily generate embeddable C code for SVD or
PINV, since both blocks exist in DSP Blockset. --Don


"Oded" <odeda...@yahoo.com> wrote in message
news:6b69bf75.04053...@posting.google.com...

0 new messages