Solve system of Linear Equations with Constraints.
    4 views (last 30 days)
  
       Show older comments
    
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).
 are all known. (Its a known n*n matrix of values).
 are all known. (Its a known n*n matrix of values).
 are all known. (Its a known n*n matrix of values).How do I find all the  (vector of
 (vector of  's)?
's)?
 (vector of
 (vector of  's)?
's)?0 Comments
Accepted Answer
  Matt J
      
      
 on 12 Nov 2021
        
      Edited: Matt J
      
      
 on 12 Nov 2021
  
      [V,e]=eig(P.','vector');
[~,imin]=min(abs(e-1));
piVector=V(:,imin)/sum(V(:,imin));
1 Comment
  Matt J
      
      
 on 12 Nov 2021
				
      Edited: Matt J
      
      
 on 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.
More Answers (0)
See Also
Categories
				Find more on Symbolic Math Toolbox in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
