看板Programming
標 題[問題] MATLAB的問題
發信站中大資工二進位的世界 (Sat May 23 22:09:29 2009)
轉信站ptt!news.ntu!news.ncu!news.csie.ncu!BinaryBBS
小弟我因為老師交代要弄一份作業,需要弄MATLAB,但是弄出來卻這樣,希望各位大大能鼎
力相助
function dy=func2(t,y);
dy=[y(2);y(1)];
[t,y]=ode45('func2',[0,6],[0,1]);
plot(t,y);
xlabel(‘time t0=0,tt=6’);
ylabel(‘y values y1(0)=0,y2(0)=1’);
??? function dy=func2(t,y);
|
Error: Function definitions are not permitted at the prompt or in scripts.
不知道語法或者哪邊弄錯,拜託各位高手大大幫個忙,謝謝!!
--
〒作者:TIM1370 來自:61-57-114-230.nty.dynamic.lsc.net.tw
◎二進位的世界【140.115.50.50‧bbs.ncu.cc】