[問題] ode23 feval的錯誤 R2006a版本已回收

看板MATLAB作者 (心屏氣和)時間17年前 (2008/12/28 15:34), 編輯推噓1(104)
留言5則, 2人參與, 最新討論串1/1
錯誤訊息 ??? Error using ==> feval Undefined command/function 'planet'. 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, ... ================================== 程式碼 clear all;clc; % Variable define t0=0; tf=25; x0=[5 2]; [t,x]=ode23('planet',[t0 tf],x0); %('fire name',[t0 tf],tinit,other setting) axies=([0 25 -10 5]); plot(t,x(:,2)) title('ode23 result 2') grid 書上的範例 已經有爬過文了 但是沒有我要的...Orz -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.127.33.142 ※ 編輯: japing 來自: 140.127.33.142 (12/28 15:35)

12/29 16:21, , 1F
你需要有一個函數
12/29 16:21, 1F

12/29 16:22, , 2F
planet是你的函數 你要傳給他
12/29 16:22, 2F

12/29 16:22, , 3F
書上既然有這範例你要找找看有沒有附planet這個function
12/29 16:22, 3F

12/29 16:22, , 4F
或是檔案
12/29 16:22, 4F

12/30 03:43, , 5F
找到了 感謝樓上^^
12/30 03:43, 5F
文章代碼(AID): #19Lom9Hl (MATLAB)
文章代碼(AID): #19Lom9Hl (MATLAB)