[問題] Dsolve出了問題不太理解

看板Mathematica作者 (若自礌)時間12年前 (2012/10/23 17:48), 編輯推噓1(104)
留言5則, 2人參與, 最新討論串1/1
f = 0.005 g[t_] := 2 UnitStep[t] - 4 UnitStep[t - f] + 4 UnitStep[t - 2 f] - 4 UnitStep[t - 3 f] + 4 UnitStep[t - 4 f] - 4 UnitStep[t - 5 f] + 4 UnitStep[t - 6 f] sol = DSolve[{v'[t] + v[t]/(50*10^-9*7000) == (g[t])/(50*10^-9*7000), v[0] == 0}, v, t] 可是當我跑完上面那一行時,他就會出現Reduce::ratnz: Reduce was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result. >> 我要做的事情大概就是個RC電路用方波時的圖形,可是當我打出v[0]=0的時候他就會跑出 上面那一行,請問我應該怎麼辦? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.66.77

10/23 22:36, , 1F
把 f = 0.005 改成 f = 1/200
10/23 22:36, 1F

10/23 22:36, , 2F
這是因為 Mathematica 在看到有浮點數時會用浮點數計算
10/23 22:36, 2F

10/23 22:37, , 3F
於是對稍微複雜一點的式子可能會達不到所要求的精準度
10/23 22:37, 3F

10/23 22:38, , 4F
不過基本上不是什麼大問題就是了...
10/23 22:38, 4F

10/25 00:32, , 5F
謝謝回答:)
10/25 00:32, 5F
文章代碼(AID): #1GXcVI3q (Mathematica)
文章代碼(AID): #1GXcVI3q (Mathematica)