Re: [問題] Fitting Parameters

看板Mathematica作者 (土木技師)時間10年前 (2014/01/01 16:30), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《manquentin (明天會更好)》之銘言: : 我想問一些fitting的問題 : 例如我有下列算式 : 2a+b+c=R1 : b+c+2d=R2 : a+b+6e=R3 : 然後我已知S1,S2,S3的值 : 我要minimize X=sqrt{[(R1-S1)^2+(R2-S2)^2+(R3-S3)^2]/3} : 請問如果求出a,b,c,d,e的值令 X 最小呢? : 以上是簡化想出來的問題,實驗做起來會有更多的參數 : 感謝 Minimize[{f,cons},{x,y,...},dom] minimizes with variables over the domain dom, typically Reals or Integers.> NMinimize[{f,cons},{x,y,...}] minimizes f numerically subject to the \ constraints cons. eqns = {2 a + b + c == r1, b + c + 2 d == r2, a + b + 6 e == r3}; nums = {s1 -> 2, s2 -> -1, s3 -> -3}; X = Sqrt[(r1 - s1)^2 + (r2 - s2)^2 + (r3 - s3)^2]; Minimize[{X, eqns /. nums}, {r1, r2, r3}] 類似這樣嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.136.172.234

01/14 04:06, , 1F
謝謝,我試試看
01/14 04:06, 1F
文章代碼(AID): #1Imz8HFb (Mathematica)
討論串 (同標題文章)
文章代碼(AID): #1Imz8HFb (Mathematica)