Last active
April 11, 2016 06:27
-
-
Save chrishwiggins/d119bb0a33b9545209f17c116fccffdb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%% little code to compute steady state "q" from creation+decay "wp,wm" | |
% wp=creation | |
% wm=destruction | |
function q=qdef(wp,wm); | |
% 1) most important line p=\Pi (wp_j/wm_{j+1})=S^+_n/S^-/n | |
p=cumprod( wp(1:(end-1)) ... | |
./ ... | |
wm((1+1):end) ... | |
); | |
% 2) add p0=1 | |
p=[1;p(:)]; | |
% 3) normalize | |
q=p(:)/sum(p(:)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment