Genetic-Algorithm

所属分类:matlab编程
开发工具:matlab
文件大小:3KB
下载次数:1
上传日期:2019-01-02 17:54:19
上 传 者matlab的旋律
说明:  两个例子的代码的主要区别在CalFitness.m和PlotModel.m中,其余的通用。 第一个例子,求解` z=sinx+cosy+0.1(x+y) `的最大值,CalFitness.m和PlotModel.m中对应的都是注释部分 第二个例子,给出了一系列点,利用欧式距离公式` min d=\sum_{i=1}^{10}\sqrt{(x_0-x_i)^2+(y_0-y_i)^2} `求解一系列点中的某个点,这个点到其余所有点的距离最小,直接运行就是这个问题的解。
(The main difference between the code for the two examples is in CalFitness.m and PlotModel.m, and the rest are generic. In the first example, the maximum value of `z=sinx+cosy+0.1(x+y)` is solved, and the corresponding parts in CalFitness.m and PlotModel.m are comments. In the second example, a series of points are given, using the Euclidean distance formula ` min d=\sum_{i=1}^{10}\sqrt{(x_0-x_i)^2+(y_0-y_i)^2} `Solve a point in a series of points, the distance from this point to all the other points is the smallest, direct operation is the solution to this problem.)

文件列表:
Genetic-Algorithm\AcrChrom.m (418, 2018-09-05)
Genetic-Algorithm\CalAveFitness.m (99, 2018-09-05)
Genetic-Algorithm\CalFitness.m (667, 2018-09-05)
Genetic-Algorithm\FindBest.m (191, 2018-09-05)
Genetic-Algorithm\IfOut.m (192, 2018-09-05)
Genetic-Algorithm\Initialize.m (219, 2018-09-05)
Genetic-Algorithm\main.m (1707, 2018-09-05)
Genetic-Algorithm\MutChrom.m (542, 2018-09-05)
Genetic-Algorithm\PlotModel.m (637, 2018-09-05)
Genetic-Algorithm\ReplaceWorse.m (405, 2018-09-05)
Genetic-Algorithm (0, 2019-01-02)

# Genetic-Algorithm 遗传算法的Matlab实现,包含两个简单的例子 两个例子的代码的主要区别在CalFitness.m和PlotModel.m中,其余的通用。 第一个例子,求解` z=sinx+cosy+0.1(x+y) `的最大值,CalFitness.m和PlotModel.m中对应的都是注释部分 第二个例子,给出了一系列点,利用欧式距离公式` min d=\sum_{i=1}^{10}\sqrt{(x_0-x_i)^2+(y_0-y_i)^2} `求解一系列点中的某个点,这个点到其余所有点的距离最小,直接运行就是这个问题的解。 |序号 |x |y | |:---:|:---:|:---:| |1| 1.4| 3.6| |2| 2.7| 0.1| |3| 1.5| 6.9| |4| 4.6| 3.6| |5| 5.2| 1.2| |6| 5.6| 2.7| |7| 8.2| 3.5| |8| 3.8| 2.1| |9| 4.6| 2.9| |10| 8.7| 3.3|

近期下载者

相关文件


收藏者