1. check your statement in "用一个笨方法来解", it is not feasible for the answer you provided in #5.
2. If you include the Pii terms in residual, then the answer from LINGO is better than Matlab .
1. lb =0 ub=1, means that all 0<=Pij<=1
2. if Pii was exist, then AX=b
3. the answer of MATLAB will produce bigger residual than LINGO solution
4. If Tk ==> inf, then this is a Markov-chain problem, the ultimate stationary solution P_inf will equal to
0.25*ones(4,4)