フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Solve a nonlinear system.

3 ビュー (過去 30 日間)
José Bavio
José Bavio 2011 年 12 月 27 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
José Bavio
José Bavio 2011 年 12 月 27 日
prob_perd is constant.
bym
bym 2011 年 12 月 27 日
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

回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 12 月 27 日
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