資源簡介
該用matlab 實現的遺傳算法可以用于多目標有約束優化,是我最近學習matlab時一個視頻上講的例子,視頻在土豆網搜“matlab全局優化方法及應用”。希望多大家有用。
代碼片段和文件信息
%?使用平臺?-?Matlab2008Ra
%by?akjuan
%all?rights?preserved?by?www.4math.cn?www.matlabsky.cn
%2008.12
function?my_ga_test1()??
figure
ezsurf(@(xy)20+x^2+y^2-10*(cos(2*pi*x)+cos(2*pi*y))[-5?5][-5?5])
text(0085‘\downarrowglobelmin(00)‘‘EdgeColor‘‘red‘‘FontSize‘18‘BackgroundColor‘[.7?.9?.7]);
figure
ezcontour(@(xy)20+x^2+y^2-10*(cos(2*pi*x)+cos(2*pi*y))[-1?1][-1?1])
text(00‘\downarrowglobelmin(00)‘‘FontSize‘18);
disp(‘please?press?any?key?to?continue.....‘)
pause()
FitnessFunction?=?@simple_fitness;
numberOfVariables?=?2;
?opt=?gaoptimset(‘Plo
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1166??2008-12-08?15:06??my_ga_test1.m
-----------?---------??----------?-----??----
?????????????????1166????????????????????1
- 上一篇:Matlab 說話人識別和確認系統
- 下一篇:SRC
評論
共有 條評論