MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]如何解方程? (https://www.labfans.com/bbs/showthread.php?t=4154)

yanyan300300 2008-08-19 18:45

[求助]如何解方程?
 
有隐式表达式
f1(x1,x2,x3,x4)=A
f2(x1,x2,x3,x4)=B
f3(x1,x2,x3,x4)=C
f4(x1,x2,x3,x4)=D
A B C D均为常数
请问如何利用matlab或者其他计算机方法求得x1~x4的值?谢谢!

pslpsl 2008-08-21 00:41

回复: [求助]如何解方程?
 
[code]
clc;clear;
syms x1 x2 x3 x4;
%以下代入实际的函数
equ1=f1(x1,x2,x3,x4)-A;
equ2=f2(x1,x2,x3,x4)-B;
equ3=f3(x1,x2,x3,x4)-C;
equ4=f4(x1,x2,x3,x4)-D;
%以上代入实际的函数
[x1,x2,x3,x4]=solve(equ1,equ2,equ3,equ4,x1,x2,x3,x4);
x1=vpa(x1,5)
x2=vpa(x2,5)
x3=vpa(x3,5)
x4=vpa(x4,5)
%BY PSL 2008 08 21
[/code]

ormosia 2008-09-26 10:59

回复: [求助]如何解方程?
 
如果是比如十个未知量的更多组方程式呢?有没有别的方法?


所有时间均为北京时间。现在的时间是 02:58

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.