| 3 | 1/1 | 返回列表 |
| 查看: 3677 | 回復(fù): 2 | ||
[求助]
sin函數(shù)的傅里葉變換
|
|
我想做sin函數(shù)的傅里葉變換 可是程序沒有error,但是運(yùn)行就說那個exe文件停止工作,程序如下,好像很多問題的樣子,新手求指教! program main use textgraphlib implicit none real,parameter::endx=3.1,startx=0.0,xinc=0.1 integer,parameter::maxx=32,maxy=20 real ::x,px=0.0,py=0.0 integer i,num,fx,fy,xx real,allocatable::datax( ,datay(![]() x=startx do i=1,maxx x=px py=sin(x) datax(i)=px datay(i)=py px=px+xinc end do call four1(datay,16,1) call setscreen(maxx,maxy) do xx=1,maxx fy=datay(xx) call putchar(xx,fy) end do call updatescreen() stop end program subroutine four1(data1,nn,isign) integer isign,nn real data1(2*nn) integer i,istep,j,m,mmax,n real tempi,tempr double precision theta,wi,wpi,wpr,wr,wtemp n=2*nn j=1 do i=1,n,2 if(j.gt.i)then tempr=data1(j) tempi=data1(j+1) data1(j)=data1(i) data1(j+1)=data1(i+1) data1(i)=tempr data1(i+1)=tempi end if m=n/2 1 if((m.ge.2).and.(j.gt.m)) then j=j-m m=m/2 goto 1 end if j=j+m end do mmax=2 2 if(n.gt.mmax) then istep=2*mmax theta=6.28318530717959d0/(isign*mmax) wpr=-2.d0*sin(0.5d0*theta)**2 wpi=sin(theta) wr=1.d0 wi=0.d0 do m=1,mmax,2 do i=m,n,istep j=i+mmax tempr=sngl(wr)*data1(j)-sngl(wi)*data1(j+1) tempi=sngl(wr)*data1(j+1)+sngl(wi)*data1(j) data1(j)=data1(i)-tempr data1(j+1)=data1(i+1)-tempi data1(i)=data1(i)+tempr data1(i+1)=data1(i+1)+tempi end do wtemp=wr wr=wr*wpr-wi*wpi+wr wi=wi*wpr+wtemp*wpi+wi end do mmax=istep goto 2 end if return end |
木蟲 (著名寫手)
| 3 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 材料與化工(0856)304求B區(qū)調(diào)劑 +3 | 邱gl 2026-03-30 | 7/350 |
|
|---|---|---|---|---|
|
[考研]
|
鐘llll 2026-03-26 | 5/250 |
|
|
[考研] 332求調(diào)劑 +6 | @MZB382400 2026-03-28 | 6/300 |
|
|
[考研] 329求調(diào)劑,一志愿西北工業(yè)大學(xué),材料工程(085601) +5 | 小小機(jī)靈蟲 2026-03-29 | 11/550 |
|
|
[考研] 求化學(xué)調(diào)劑 +11 | wulanna 2026-03-28 | 11/550 |
|
|
[考研] 考研調(diào)劑 +7 | 小蠟新筆 2026-03-29 | 7/350 |
|
|
[考研] 22408 359分調(diào)劑 +4 | Qshers 2026-03-27 | 6/300 |
|
|
[考研] 086000生物與醫(yī)藥調(diào)劑 +5 | Feisty。 2026-03-28 | 9/450 |
|
|
[考研] 0856材料化工調(diào)劑 總分330 +14 | zhubinhao 2026-03-27 | 14/700 |
|
|
[考研] 調(diào)劑求院校招收 +6 | 鶴鯨鴿 2026-03-28 | 6/300 |
|
|
[考研] 304求調(diào)劑 +6 | 曼殊2266 2026-03-27 | 6/300 |
|
|
[考研] 070300求調(diào)劑306分 +4 | 26要上岸 2026-03-27 | 4/200 |
|
|
[考研]
|
18419759900 2026-03-25 | 8/400 |
|
|
[考研] 08開頭275求調(diào)劑 +4 | 拉誰不重要 2026-03-26 | 4/200 |
|
|
[考研] 316求調(diào)劑 +5 | Pigcasso 2026-03-24 | 5/250 |
|
|
[論文投稿] Journal of Mechanical Science and Technology +3 | Russ_ss 2026-03-25 | 5/250 |
|
|
[考研] 調(diào)劑 +4 | 柚柚yoyo 2026-03-26 | 4/200 |
|
|
[考研] 總分322求生物學(xué)/生化與分子/生物信息學(xué)相關(guān)調(diào)劑 +5 | 星沉uu 2026-03-26 | 6/300 |
|
|
[考研]
|
WWW西西弗斯 2026-03-24 | 8/400 |
|
|
[考研] 296求調(diào)劑 +4 | 汪!?! 2026-03-25 | 7/350 |
|