| 5 | 1/1 | 返回列表 |
| 查看: 1643 | 回復(fù): 4 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
astringent銅蟲 (著名寫手)
|
[交流]
【求助】相關(guān)函數(shù)歸一化后,輸出值怎么變成NaN了?? 已有3人參與
|
||
|
我編程計(jì)算相關(guān)函數(shù)時(shí),未歸一化時(shí)求出的相關(guān)函數(shù)趨勢(shì)是對(duì)的,可是我加了歸一化的語句后(也就是程序中的tcf0(delt)=tcf0(delt)+tcf0(t)*tcf0(t)),輸出的相關(guān)函數(shù)的值就變成NaN了,我查了一下,NaN可能是運(yùn)算錯(cuò)誤,請(qǐng)大家?guī)兔纯,是我的歸一化條件加的不對(duì)嗎??先謝謝了 下面是我的程序: do i=1,10000 (粒子數(shù)) do ntel=1,npoints (共有npoints個(gè)數(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(delt)=tcf0(delt)+tcf0(t)*tcf0(t) enddo endif enddo enddo do ical=1,npoints tcf(ical)=tcf(ical)/tcf0(ical) [ Last edited by ghcacj on 2010-12-8 at 09:28 ] |
木蟲 (著名寫手)
金蟲 (正式寫手)

銅蟲 (著名寫手)
|
我原來的程序是這樣的,此時(shí)沒出現(xiàn)輸出錯(cuò)誤的問題, do i=1,10000 (粒子數(shù)) do ntel=1,npoints (共有npoints個(gè)數(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) enddo endif enddo enddo do ical=1,npoints tcf(ical)=tcf(ical)/nparticle*ntime(t) enddo 但是我需要算歸一化的相關(guān)函數(shù),于是我就把tcf(delt)=tcf(delt)+tcf(ntel)*tcf0(t) 改成了tcf(delt)=tcf(delt)+(tcf(ntel)*tcf0(t))/(tcf0(t)*tcf0(t) ) ,就出現(xiàn)輸出錯(cuò)誤了,是怎么回事呢? |
銅蟲 (著名寫手)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 354求調(diào)劑 +4 | lxb598 2026-03-31 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 085801 總分275 本科新能源 求調(diào)劑 +10 | bradoner 2026-04-01 | 12/600 |
|
|
[考研] 08生物與醫(yī)藥專碩初試346找調(diào)劑 +6 | dianeeee 2026-04-01 | 7/350 |
|
|
[考研] 材料工程322分 +7 | 哈哈哈吼吼吼哈 2026-04-01 | 7/350 |
|
|
[考研] 085602化學(xué)工程268分蹲調(diào)劑 +8 | 月照花林。 2026-04-01 | 8/400 |
|
|
[考研] 環(huán)境工程297分求調(diào)劑一志愿杭高院 +10 | GENJIOW 2026-03-31 | 11/550 |
|
|
[考研] 307分求調(diào)劑 +14 | (o~o) 2026-03-31 | 15/750 |
|
|
[考研] 286求調(diào)劑 +5 | Sa67890. 2026-04-01 | 7/350 |
|
|
[考研] 086000生物與醫(yī)藥298調(diào)劑求助 +4 | 元元青青 2026-03-31 | 6/300 |
|
|
[考研] 求調(diào)劑:085600材料與化工,考材科基,總分319 +17 | 678lucky 2026-03-31 | 21/1050 |
|
|
[考研] 086000調(diào)劑 +5 | 7901117076 2026-03-26 | 5/250 |
|
|
[考研] 一志愿食品科學(xué)與工程083200求調(diào)劑 +4 | XQTJZ 2026-03-30 | 4/200 |
|
|
[考研] 福建理工大學(xué)材料學(xué)院先進(jìn)合金團(tuán)隊(duì)招收考研調(diào)劑學(xué)生 +3 | 大華金商都 2026-03-30 | 4/200 |
|
|
[考研] 食品工程專碩一志愿中海洋309求調(diào)劑 +5 | 小張zxy張 2026-03-26 | 10/500 |
|
|
[考研] 哈爾濱工業(yè)大學(xué)材料與化工專碩378求調(diào)劑 +3 | 塔比烏斯 2026-03-30 | 3/150 |
|
|
[考研] 一志愿雙一流機(jī)械285分求調(diào)劑 +4 | 幸運(yùn)的三木 2026-03-29 | 5/250 |
|
|
[考研] 085600,專業(yè)課化工原理,321分求調(diào)劑 +5 | 大饞小子 2026-03-28 | 5/250 |
|
|
[考研] 復(fù)試調(diào)劑 +3 | raojunqi0129 2026-03-28 | 3/150 |
|
|
[考研] 285求調(diào)劑 +4 | AZMK 2026-03-27 | 7/350 |
|
|
[考研] 復(fù)試調(diào)劑,一志愿南農(nóng)083200食品科學(xué)與工程 +5 | XQTJZ 2026-03-26 | 5/250 |
|