| 7 | 1/1 | 返回列表 |
| 查看: 1452 | 回復: 6 | |||
astringent銅蟲 (著名寫手)
|
[交流]
【求助】相關函數(shù)歸一化問題 已有4人參與
|
|
最近一直在看自相關函數(shù)的程序,有個問題想不通。 自相關函數(shù)的定義是A=(a(t)*a(0))/(a(0)*a(0)),當對體系中所有粒子求和時,是先算出每個例子的(a(t)*a(0)) /(a(0)*a(0))然后求和?還是先分別求a(t)*a(0)以及a(0)*a(0)和然后再相除呢?兩者有什么區(qū)別?請大家指點。 [ Last edited by ghcacj on 2010-12-8 at 09:27 ] |
木蟲 (著名寫手)
銅蟲 (著名寫手)
|
請問老虎大王,我在寫程序的時候直接把t=0的相關函數(shù)做分母了,也就是 tcf(delt)=tcf(delt)+tcf(ntel)*tcf0(t)/ tcf0(t)*tcf0(t),可是輸出錯誤,請問,我這樣寫為什么不可以呢?應該怎樣寫? do i=1,10000 (粒子數(shù)) do ntel=1,npoints (共有npoints個數(shù)據(jù)) if (確定timeorigin的條件) then t0=t0+1 time0(t0)=ntel tcf0(t0)=tcf(ntel) do t=1,t0 delt=ntel-time0(t)+1 tcf(delt)=tcf(delt)+tcf(ntel)*tcf0(t)/ tcf0(t)*tcf0(t) enddo endif enddo enddo do ical=1,npoints tcf(ical)=tcf(ical)/(npoints*ntime(t)) write(*,*) ical, tcf(ical) enddo |
銅蟲 (著名寫手)
銅蟲 (著名寫手)
|
為什么我用兩種方法得到的結果有很大差別呢,勞煩指教。 下面是我的程序 這是我的程序: do i=1,10000 (粒子數(shù)) do ntel=1,npoints (共有npoints個數(shù)據(jù)) if (確定timeorigin的條件) then t0=t0+1 time0(t0)=ntel tcf0(t0)=tcf(ntel) do t=1,t0 delt=ntel-time0(t)+1 if(delt.lt.npoints) tcf(delt)=tcf(delt)+tcf(ntel)*tcf0(t) tcf0(delt)=tcf0(delt)+tcf0(t)*tcf0(t) acf(delt)=tcf(delt)+tcf(ntel)*tcf0(t)/ tcf0(t)*tcf0(t) endif enddo endif enddo enddo do ical=1,npoints tcf(ical)=(tcf(ical)/(npoints*ntime(t))/(tcf0(ical)/(npoints*ntime(t)) acf(ical)=acf(ical)/(npoints*ntime(t)) write(*,*) ical, tcf(ical) write(*,*) ical, acf(ical) enddo 下面是我的輸出結果(我只截取了一部分) 0.0000000000000000 1.0000000000000000 0.0000000000000000 1.14207400639561443E-004 1.0000000149011612 0.67655786350148372 1.0000000149011612 7.72679149727596715E-005 2.0000000298023224 0.62686567164179108 2.0000000298023224 7.15926989083817998E-005 3.0000000447034836 0.60360360360360366 3.0000000447034836 6.89359985842397961E-005 4.0000000596046448 0.58610271903323263 4.0000000596046448 6.69372680485647080E-005 5.0000000745058060 0.57012195121951215 5.0000000745058060 6.51121460963353292E-005 6.0000000894069672 0.55828220858895705 6.0000000894069672 6.37599598662582241E-005 7.0000001043081284 0.54629629629629639 7.0000001043081284 6.23910799790196834E-005 8.0000001192092896 0.51552795031055898 8.0000001192092896 5.88771071620099369E-005 9.0000001341104507 0.52187499999999998 9.0000001341104507 5.96019872087711250E-005 10.000000149011612 0.52515723270440251 10.000000149011612 5.99768424742350986E-005 |

木蟲 (小有名氣)
| 7 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 0856材料與化工調(diào)劑,339 +5 | 10213207 2026-03-31 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 309求調(diào)劑 +17 | 誰不是少年 2026-03-29 | 17/850 |
|
|
[考研] 復試調(diào)劑 +7 | 雙馬尾痞老板2 2026-03-31 | 7/350 |
|
|
[考研] 324分 085600材料與化工 +6 | 呆鵝oor 2026-03-27 | 6/300 |
|
|
[考研] 機械學碩總分317求調(diào)劑。。。 +6 | Acaciad 2026-03-25 | 6/300 |
|
|
[考研] 315求調(diào)劑 +6 | akie... 2026-03-28 | 7/350 |
|
|
[考研] 322求調(diào)劑:一志愿湖南大學 材料與化工(085600),已過六級。 +10 | XX小鄧 2026-03-29 | 10/500 |
|
|
[考研] 322求調(diào)劑 +3 | 熹僖XX 2026-03-31 | 3/150 |
|
|
[考研] 270求調(diào)劑 +3 | 小杰pp 2026-03-31 | 4/200 |
|
|
[考研] 調(diào)劑求院校招收 +7 | 鶴鯨鴿 2026-03-28 | 7/350 |
|
|
[考研] 313求調(diào)劑 +6 | 賣個關子吧 2026-03-31 | 6/300 |
|
|
[考研] 320分,材料與化工專業(yè),求調(diào)劑 +10 | 一定上岸aaa 2026-03-27 | 14/700 |
|
|
[考研] 各位老師好,我的一志愿為北京科技大學085601材料專碩 +10 | Koxui 2026-03-28 | 10/500 |
|
|
[考研] 0703化學求調(diào)劑 +6 | 丹青奶蓋 2026-03-26 | 8/400 |
|
|
[考研] 328求調(diào)劑 +8 | 嗯滴的基本都 2026-03-27 | 8/400 |
|
|
[考研] 303求調(diào)劑 +7 | DLkz1314. 2026-03-30 | 7/350 |
|
|
[考研] 086000生物與醫(yī)藥調(diào)劑 +5 | Feisty。 2026-03-28 | 9/450 |
|
|
[考研] 復試調(diào)劑 +3 | raojunqi0129 2026-03-28 | 3/150 |
|
|
[考研] 085701環(huán)境工程,267求調(diào)劑 +16 | minht 2026-03-26 | 16/800 |
|
|
[考研] 292求調(diào)劑 +4 | 求求了收下我吧?/a> 2026-03-26 | 4/200 |
|