[問題] 有關於gatoolbox已回收
我現在遇到一個問題
function z = cost_function(p)
z = 500 + 5.3*(p(1)) + 0.004*((p(1))^2) + 5.3*(p(2)) + 0.006*((p(2))^2) +
5.5*(p(3)) + 0.008*((p(3))^2) + 5.9*(p(4)) + 0.010*((p(4))^2) + 6.1*(p(5)) +
0.012*((p(5))^2)
這個是我.m檔的內容
那我GA方面的參數設定為
A:[-1 -1 -1 -1 -1] b:-975
Aeq:[1 1 1 1 1] beq:975
lower: [200 150 100 50 50] upper:[450 400 350 300 250]
但是結果卻是
Error using ==> makeState at 50
GA cannot continue because user supplied fitness function failed with the
following error:
Undefined function or method 'cost_function' for input arguments of type
'double'.
Command Window裡有這樣的警告
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 9.930137e-017.
還懇請板上有會用gatoolbox的高手可以不吝賜教
為小弟我指點迷津啊~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.121.135.33
※ 編輯: tony0324 來自: 140.121.135.33 (06/22 18:50)
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章