Inverse of higher order matrix

4 vues (au cours des 30 derniers jours)
raina RAJ
raina RAJ le 9 Fév 2021
Hello there,
I am trying to get inverse of a 80,000 order matrix but the calculation is taking too much time. Is there any fastest way or method to calculate the inverse of a matrix?
  6 commentaires
Matt J
Matt J le 10 Fév 2021
Is the matrix Q sparse? Are you using Matlab's sparse data format to store Q?
Does e contain arbitrary values or is it e=ones(M,1)?
raina RAJ
raina RAJ le 10 Fév 2021
Yes matrix Q is stored in sparse data format and e is ones(M,1).

Connectez-vous pour commenter.

Réponses (2)

Matt J
Matt J le 10 Fév 2021
Modifié(e) : Matt J le 10 Fév 2021
I have system of equations xQ = 0 and xe =1 where 'e' is a column vector of appropriate dimension, x is a row vector of size (1,M) and Q matix has size (M,M).
If Q is sparse, you can do,
x=eigs(Q.',1,'sm');
x=x/sum(x);

Christine Tobler
Christine Tobler le 10 Fév 2021
Another way of looking at the equations x*Q = 0 and x e = 1 is as an equation system x * [Q e] = [0 1], which you could solve using
A = [Q, ones(n, 1)]';
b = [zeros(n, 1); 1];
x = A \ b;
or if this is too slow, you could try an iterative algorithm:
x = lsqr(A, b);

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by