newstationary

newstationary - C:\work\stationary.m July 11, 2003 Page 1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
C:\work\stationary.m Page 1 July 11, 2003 3:45:49 PM function v = stationary(P) % % This is a MATLAB function that calculates the stationary probability vect or v % of a Markov chain transition matrix P, i.e., we solve v = v*P . % We assume the existence of a unique stationary vector. % For a finite-state Markov chain, the condition is that the chain be irred ucible. % % To solve the system of n equations in n unknowns, we use the matrix inver se function inv. % For a square matrix A, inv(A)*A = I, where I is the identity matrix (1's on the diagonal, 0's elsewhere). % % We input the matrix P when we call the function. % First find the number n of rows in the transition matrix P. s = size(P); n = s(1); % There is one redundant equation in the n equations v = vP. % We fill gap by using the fact that v(1) + . .. + v(n) = 1. % We eliminate redundant equation by replacing last column of P with ones. PP = P;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/20/2010 for the course IEOR 4106 taught by Professor Whitt during the Spring '08 term at Columbia.

Page1 / 2

newstationary - C:\work\stationary.m July 11, 2003 Page 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online