[問題] MATLAB ODE錯誤= = 請高手指教

看板Programming作者 (saber.c)時間14年前 (2010/04/14 15:13), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
小弟論文需要跑一些控制程式,所以用MATLAB去跑圖形QQ 我程式打完,可是卻出現錯誤訊息,我研究一下ode23那個函式沒進去 不知道是哪邊錯誤QQ 錯誤訊息: ??? Attempted to access x(2); index out of bounds because numel(x)=1. Error in ==> ztwoorder at 11 xdot=[x(2); Error in ==> funfun\private\odearguments at 110 f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0. Error in ==> ode23 at 172 [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ... Error in ==> slotine at 45 [t,x]=ode23('ztwoorder',tspan,x0 程式我貼在網址上 http://paste.plurk.com/show/231297/ 主程式 .m檔 http://paste.plurk.com/show/231299/ 兩個函式.m檔 貼在一起 請高手幫忙Q_Q~~~ 這個我苦惱很久 不知道怎麼處理 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.130.22.88

04/14 20:29, , 1F
有 matlab 版
04/14 20:29, 1F
文章代碼(AID): #1BnMiHLd (Programming)