MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]solve命令 (https://www.labfans.com/bbs/showthread.php?t=3371)

fanxing39 2008-05-30 23:25

[求助]solve命令
 
[SIZE="5"]solve('a1*x+b1=a2*x+b2')中 a1,b1,a2,b2 如何赋值?[/SIZE]

fgabertb 2008-05-31 00:06

我習慣用 @ 函數

syms x
f=@(a1,a2,b1,b2) a1*x+b1-(a2*x+b2);
solve(f(1,2,8,4))

ans =

4


>>

表示 x+8-(2*x+4)=0 的解是 4:smile:

fanxing39 2008-05-31 12:45

谢谢高手!:tongue:


所有时间均为北京时间。现在的时间是 11:18

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