Solve system of Linear Equations with Constraints.
조회 수: 4 (최근 30일)
이전 댓글 표시
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
채택된 답변
Matt J
2021년 11월 12일
편집: Matt J
2021년 11월 12일
[V,e]=eig(P.','vector');
[~,imin]=min(abs(e-1));
piVector=V(:,imin)/sum(V(:,imin));
댓글 수: 1
Matt J
2021년 11월 12일
편집: Matt J
2021년 11월 12일
@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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!