'syms' requires Symbolic Math Toolbox. Error in Solve_ergodic_ctmc (line 1) syms p1 p2 p3 p4 p5 p6 I am using trial version Help?

11 visualizaciones (últimos 30 días)
'syms" requires Symbolic Math Toolbox
How do I link Symbolic Math Tool box in trial Matlab version in my script below
syms p1 p2 p3 p4 p5 p6
eqn1 = - p1*0.00074 + p2*30+ p5*2+ p6*0.2 == 0
eqn2 = p1*0.00062 - p2*30.00077 == 0;
eqn3 = p1*0.00012 +0.00031*p2 - p3*0.00012 == 0;
eqn4 = p2*0.00046 +p3*0.00012- p4*0.00063 == 0;
eqn5 = p4*0.0004 - p5*2 == 0;
eqn6 = p4*0.00023 - p5*0.2 == 0;
eqn7 = p1+p2+p3+p4+p5+p6==1;
eqns = [eqn1, eqn2, eqn3, eqn4, eqn5, eqn7]
sol = solve([eqns],[p1,p2,p3,p4,p5,p6]);
p1sol = sol.p1
p2sol = sol.p2

Respuestas (1)

KSSV
KSSV el 22 de Jun. de 2021
You need to have symbolic toolbox downloaded. Check
which syms
This should show the toolbox. I am not sure symbolic tool box is given in trial version or not.
  3 comentarios
KSSV
KSSV el 22 de Jun. de 2021
Editada: KSSV el 22 de Jun. de 2021
Write the equations in the form
Ax = b
Where A is all the coefficients of unknowns and b is your RHS of the equations and solve for unknownx x using:
x = A\b
Like shown below:
A = [-0.00074 30 0 0 2 0.2 ;
0.00062 -30.00077 0 0 0 0 ;
0.00012 0.00031 -0.00012 0 0 0 ;
0 0.00046 0.00012 -0.00063 0 0 ;
0 0 0 0.0004 -2 0 ;
0 0 0 0.00023 -0.2 0 ;
1 1 1 1 1 1 ] ;
b = [0;0;0;0;0;0;1] ;
x = A\b
Vijaya Kumar Kondagunta
Vijaya Kumar Kondagunta el 22 de Jun. de 2021
x=A\b in above is returning Unrecognised function or variable x
Some library of function need to be included in script to execute the above ?

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by