Re: [問題] c++寫false position method
看板C_and_CPP (C/C++)作者coolbetter33 (香港3345678)時間16年前 (2009/10/02 17:33)推噓-1(0推 1噓 3→)留言4則, 3人參與討論串2/4 (看更多)
恩.我把algorithm拉出來給大家想想
f(x)=0 .x介於[p0.p1]
step1. i=2;q0=f(p0),q1=f(p1)
step2.while i小於等於n0 do step 3-7
step3.set p=p1-q1(p1-p0)/(q1-q0) . [compute p_i]
step4. if abs[p-p_i] < TOL then OUTPUT(P); STOP
step5.set i=i+1 ; q=f(p)
step6 if q*q1<0 then set p0 =p1;q0=q1.
step7 set p1=p;q1=q.
step8 output;stop
各位大大要的是這個嗎 @@?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 113.61.179.15
※ 編輯: coolbetter33 來自: 113.61.179.15 (10/02 17:37)
→
10/02 17:37, , 1F
10/02 17:37, 1F
→
10/02 19:21, , 2F
10/02 19:21, 2F
噓
10/02 19:47, , 3F
10/02 19:47, 3F
→
10/02 19:47, , 4F
10/02 19:47, 4F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 4 篇):
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章