This forum has been archived. All content is frozen. Please use KDE Discuss instead.

vector = matrix * matrix^-1 * vector

Tags: None
(comma "," separated)
ajax20
Registered Member
Posts
10
Karma
0
hi,

i'd like to solve this Problem: vector = matrix * matrix^-1 * vector
hs size = (ns x ns), hf size = (nf x ns), u size (ns x 1)

uf = hf * hs^-1*u

my first solution was uf= Hf*(Hs.fullPivLu().solve(u))

but i need the product of hf*hs^-1

like
kopplungsmatrix = Hf*Hs.inverse();
uf = kopplungsmatrix*u;

can i use another solver like this?

Greedings Ajax
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
In the future you will be able to trigger a solving on the right by writing:

kopplungsmatrix = Hf * Hs.lu().inverse();

In the meantime you have to workaround:

kopplungsmatrix = Hs.transpose().lu().solve(H.transpose());
kopplungsmatrix.transposeInPlace();
ajax20
Registered Member
Posts
10
Karma
0
ah okay, thanks a lot !


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell