[問題] 關於函數的定義已回收

看板MATLAB作者 (似乎沒事的人)時間16年前 (2009/12/13 12:05), 編輯推噓1(102)
留言3則, 3人參與, 最新討論串1/1
我將以下的指令打在mathlab R2008a上 function p=fun1(x) p=x^3-2*x+cos(pi*x); 卻跳出了 ??? function p=fun1(x) p=x^2-2*x+cos(pi*x); | Error: Function definitions are not permitted at the prompt or in scripts. 這樣的錯誤訊息 請問是哪邊出了問題? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 125.224.42.189

12/13 12:48, , 1F
command window下不能定義function
12/13 12:48, 1F

12/13 14:02, , 2F
請存成m-file
12/13 14:02, 2F
※ 編輯: xwan227770 來自: 125.224.42.189 (12/13 20:27)

12/13 21:07, , 3F
可是存成m file後,還是沒辦法使用fzero的指令
12/13 21:07, 3F
文章代碼(AID): #1B96WYhv (MATLAB)
文章代碼(AID): #1B96WYhv (MATLAB)