Why does SOLVE return an incorrect result?
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (1)
pham lam
le 9 Déc 2020
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')
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!