Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Solve a nonlinear system.
조회 수: 3 (최근 30일)
이전 댓글 표시
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
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
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)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!