Solve system of Linear Equations with Constraints.
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
atharva aalok
el 12 de Nov. de 2021
I have the following system of equations with a constraint:
n equations with n unknowns
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/798309/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/798314/image.png)
Here
are all known. (Its a known n*n matrix of values).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/798319/image.png)
How do I find all the
(vector of
's)?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/798324/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/798324/image.png)
0 comentarios
Respuesta aceptada
Matt J
el 12 de Nov. de 2021
Editada: Matt J
el 12 de Nov. de 2021
[V,e]=eig(P.','vector');
[~,imin]=min(abs(e-1));
piVector=V(:,imin)/sum(V(:,imin));
1 comentario
Matt J
el 12 de Nov. de 2021
Editada: Matt J
el 12 de Nov. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!