Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Solve a nonlinear system.

3 visualizzazioni (ultimi 30 giorni)
José Bavio
José Bavio il 27 Dic 2011
Chiuso: MATLAB Answer Bot il 20 Ago 2021
I would like to solve this system. It gives no solution when it is suposed to.
This is the code:
syms s t
Q_estim1=[-1 1;2 -2];
h1=diag([1 2]); prob_perd=0.01; b=2;
aux=expm(Q_estim1*100);
pi_inf1=aux(1,:);
alfa1=log(pi_inf1*expm((Q_estim1+h1*s)*t)*ones(2,1))*1/(s*t);
eq1=diff(alfa1,s);
eq2=diff(alfa1,t);
solve('eq1-prob_perd/(s^2*t)','eq2-prob_perd/(s*t^2)-b/t^2')
I don't need analytic solution. Any help will be gratly apreciated.
  3 Commenti
José Bavio
José Bavio il 27 Dic 2011
prob_perd is constant.
bym
bym il 27 Dic 2011
ah...right
you are mixing floating point and symbolic operations which can lead to trouble. Best to use symbolic to a point then use subs() to plug in numerical values

Risposte (1)

Walter Roberson
Walter Roberson il 27 Dic 2011
When you pass a literal string to solve() then values set at the MATLAB level will not be substituted in. Remove the quotes.
solve(eq1-prob_perd/(s^2*t),eq2-prob_perd/(s*t^2)-b/t^2)

Community Treasure Hunt

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

Start Hunting!

Translated by