matlab遗传算法拟合,基于遗传算法的数据拟合在MATLAB环境中的实现

湖 南 农 机 2010 年 5 月 收稿日期:2010-04-02 作者简介:林鸿彬(1987-),男,海南海口人,主要从事信息与计算科学专业的学习。 摘 要:在自然科学中,常常在相关的 2 个量之间并不一定存在严格的函数关系,利用最小二乘法原理可以确定 其拟合方程及最优系数。然而对于较复杂的非线性问题,有时并不凑效。根据曲线拟合算法原理和遗传算法的特征,提出了利用遗传算法进行数据拟合的步骤,探讨了在 MATLAB 环境中实现遗传算法的编程方法,并以一个数据拟合实例说明遗传算法在全局寻优中的应用。 关键词:遗传算法;遗传算法;数据拟合;MATLAB 中图分类号:O17 文献标识码:A 文章编号:1007- 8320(2010)03- 0092- 02 Data fitting based on genetic algorithm implementation in MATLAB environment LIN Hong-bing (School of mathematics,YangtzeUniversity,Jingzhou,Hubei 434023,China) Abstract:Sometimesthereisnorigorousfunctionrelationbetweentwocorrelativeparametersinnaturescience.On the basis of the least Square method,the fitting equation and its optimal coefficient can be defined. However,for rather complexnonlinearproblems,this may not work. According to the principle of curve fitting algorithm and the specific propertyofgeneticalgorithm (GA),severalstepsofdatefittingwithGAarepresentedanditsrealizationinMATLABhas been discussed. A case of data fitting problem has been given to demonstrate the global optimization functionality of the MATLAB program. Key words:geneticalgorithm(GA);data fitting;MATLAB 基于遗传算法的数据拟合在 MATLAB 环境中的实现 林鸿彬 (长江大学 信息与数学学院,湖北 荆州 434023) 张向利:户县拖拉机及驾驶员年度检审现状及对策 2 2 3 Mar.2010 湖 南 农 机 HUNAN AGRICULTURAL MACHINERY 第 37 卷第 3 期·学术 Vol.37 No.3 2010 年 5 月 May.2010 1 用 MATLAB 实现遗传算法的几大模块 1.1 编码 遗传算法不对优化问题的实际决策变量进行操作,所以应用遗传算法首要的问题是通过编码将决策变量表示成串结构数据.本文中我们采用最常用的二进制编码方案,即用二进制数构成的符号串来表示一个个体,用下面 encoding 函数来实现编码并产生初始种群: function [bin_gen,bits] =encoding (min_var,ma

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值