Solve system of Linear Equations with Constraints.

7 Ansichten (letzte 30 Tage)
atharva aalok
atharva aalok am 12 Nov. 2021
Bearbeitet: Matt J am 12 Nov. 2021
I have the following system of equations with a constraint:
n equations with n unknowns
Here are all known. (Its a known n*n matrix of values).
How do I find all the (vector of 's)?

Akzeptierte Antwort

Matt J
Matt J am 12 Nov. 2021
Bearbeitet: Matt J am 12 Nov. 2021
[V,e]=eig(P.','vector');
[~,imin]=min(abs(e-1));
piVector=V(:,imin)/sum(V(:,imin));
  1 Kommentar
Matt J
Matt J am 12 Nov. 2021
Bearbeitet: Matt J am 12 Nov. 2021
@atharva aalok Though you haven't mentioned it, I'm assuming P is a stochastic matrix. Otherwise, there is no guarantee the equations have a solution.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by