看板 [ Python ]
討論串[問題] odeint 與 複數??
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者shengwey (shengwey)時間13年前 (2011/04/21 14:36), 編輯資訊
1
0
0
內容預覽:
最近剛開始接觸使用python. 請教一下,可以在odeint中使用複數函數嗎?. 另外,有比較方便的方法建立 tridiagonal matrix ?. 例如在 Mathematica 中, DiagonalMatrix 可以指定開始的位置,不一定在對角線上.... 感謝!. --. 發信站:

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者shengwey (shengwey)時間13年前 (2011/04/23 05:21), 編輯資訊
0
0
0
內容預覽:
自問自答:. def func(y,t):. y2=y[:len(y)/2]+y[len(y)/2:]*1j. f=.... return r_[f.real,f.imag]. y0r=r_[y0.real,y0.imag]. yr=odeint(func,y0,t). y=yr[:,:len(y0
首頁
上一頁
1
下一頁
尾頁