solve two equations for two unknown variables
22 次查看(过去 30 天)
显示 更早的评论
how can i solve two equations for two unknown variables?
like these two:
z=f1(x)+f2(y)
z=f3(x)+f4(y)
for z=0
please help, thx in advance.
0 个评论
采纳的回答
更多回答(5 个)
Walter Roberson
2011-12-20
That cannot be solved without knowing f1(x), f2(y), f3(x), f4(y)
Are f1, f2, f3, and f4 perhaps constants, as in f1*x + f2*y ? If so then the solution is x = 0, y = 0, unless f1*f4 = f2*f3
yasser
2011-12-20
1 个评论
Walter Roberson
2011-12-20
If your equations are
0=f1*x+f2*y
0=f3*x+f4*y
then the only solution is x = 0 and y = 0, unless it happens that f1*f4 = f2*f3 is exactly zero.
If f1*x + f2*y = 0 then y = -f1/f2 * x . Substitute this in to f3*x + f4*y = 0, and you end up with -x*(f1*f4-f3*f2)/f2 = 0 . That has solutions only if x = 0 or f1*f4-f3*f2 = 0 . If you try x = 0 then because f1*x + f2*y = 0, then f1 * 0 + f2*y = 0, then f2 * y = 0, which has a solution only if y = 0 or f2 = 0. But if f2 = 0 then the solution for x would have had a division by 0 so that possibility is out. This leaves only x = 0 and y = 0, or f1*f4 = f2*f3
Brian
2011-12-20
you can solve a 2x2 by substitution or you can use rref.m. substitution is probably easier in this case!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!