[問題] randint的問題已回收

看板MATLAB作者 (Madchester)時間16年前 (2009/10/15 10:38), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
在用randint的時候 出現了一些問題 如果我是在mfile的地方直接按F5 就可以順利執行 但是如果 我是在workspace的地方 執行 mycode.m 就會出現下面的錯誤 (不管是windows或是linux版本都一樣 orz) ??? Undefined function or method 'randint' for input arguments of type 'double'. Error in ==> Instance_generator at 11 tmp(setdiff(unique(randint(1, num_node, [1 num_node-1])), i)) = 1; Error in ==> Algorithm_A2 at 13 [A b adjoint] = Instance_generator(num_node, discount, b_lower, b_upper); 想請問版友們 該如何解決這個問題? 謝謝:) -- Kraft Durch Freude~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.127.21

10/15 11:16, , 1F
找到了 把randint.m放在那個資料夾 就可以了
10/15 11:16, 1F
文章代碼(AID): #1AreisUe (MATLAB)
文章代碼(AID): #1AreisUe (MATLAB)