how to solve a linear equation

2 visualizzazioni (ultimi 30 giorni)
hi, I am solving continuous markov chain state equation. Following is the code of those equations.
how can I get the equations (as example P0 - T(1,:)* [P0; P1 ;P2; P3] = 0) after % equations section?
Thanks
syms P0 P1 P2 P3 % stable state
syms u03 lamda13 lamda20 lamda21 u32
T= [1-u03 0 0 u03;
0 1-lamda13 0 lamda13;
lamda20 lamda21 1-lamda20-lamda21 0;
0 0 u32 1-u32];
% equations
P0=T(1,:)* [P0; P1 ;P2; P3];
P1=T(2,:)* [P0;P1;P2;P3];
P2=T(3,:)* [P0;P1;P2;P3];
P3=T(4,:)* [P0;P1;P2;P3];

Risposta accettata

Sulaymon Eshkabilov
Sulaymon Eshkabilov il 30 Ott 2019
Hi,
Here is the solution:
syms P0 P1 P2 P3 % stable state
syms u03 lamda13 lamda20 lamda21 u32
T= [1-u03 0 0 u03;
0 1-lamda13 0 lamda13;
lamda20 lamda21 1-lamda20-lamda21 0;
0 0 u32 1-u32];
% equations
E0=T(1,:)* [P0; P1 ;P2; P3];
E1=T(2,:)* [P0;P1;P2;P3];
E2=T(3,:)* [P0;P1;P2;P3];
E3=T(4,:)* [P0;P1;P2;P3];
% EQNS
EQN0 = P0- E0;
EQN1 = P1- E1;
EQN2 = P2- E2;
EQN3 = P3- E3;
Good luck
  2 Commenti
Kazi Main Uddin Ahmed
Kazi Main Uddin Ahmed il 31 Ott 2019
Thanks a lot,
Sulaymon Eshkabilov
Sulaymon Eshkabilov il 31 Ott 2019
You are welcome. Just a pleasure to be of some help.

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by