From 1f9edd988823fd397d1dbafe258f15c1fadf226a Mon Sep 17 00:00:00 2001 From: TianZhendong <33273211+TianZhendong@users.noreply.github.com> Date: Thu, 11 Apr 2019 21:47:58 +0800 Subject: [PATCH] Create fitness --- GA/fitness | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 GA/fitness 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