Why does SOLVE return an incorrect result?
古いコメントを表示
Why does SOLVE return an incorrect result?
Specifically,
> syms I01 I1 V R ts tau I2 I02 V1 V2 di1 di2 L
> f1=R*I1+L*di1-V1;
> f2=R*I2+L*di2-V2;
> [R,L]=solve(f1,f2,'R,L');
> Rsym=simple(R);
> Lsym=simple(L);
After checked by hand, the solution for R and L is exchanged, and thus incorrect although the answer is correct had the it not been exchanged.
Is this a bug?
採用された回答
その他の回答 (1 件)
pham lam
2020 年 12 月 9 日
syms x
syms x2A
% 함수식 f %
f = (2*x^2 + 4*x -3)/(x^2 + x - 4)
% 항등식 풀기, 대입 %
x1 = solve((2*x^2 + 4*x -3)/(x^2 + x - 4))
y1 = subs(f,x ,x1)
% 좌극한, 우극한 %
x2 = sym(sqrt(17)/2 - 1/2)
lim_left = limit(f,x,x2,'left')
lim_right = limit(f,x,x2,'right')
カテゴリ
ヘルプ センター および File Exchange で Equation Solving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!