diff --git a/GA/fitness b/GA/fitness new file mode 100644 index 0000000..953949e --- /dev/null +++ b/GA/fitness @@ -0,0 +1,4 @@ +function fit=fitness(x) +%求最大的,若是求最小则可以求倒 +fit=(x+10*sin(5*x)+7*cos(4*x)); +end