MATLAB: Running a project using genetic algorithm

Global Optimization Toolbox

I want to run a project using genetic algorithm and I don't know how.
This project have 4 functions that I attached this thesis here.
functions m files are in this thesis.
thank you guys.

Best Answer

Try changing the first line in all your files.
.m should start with:
function GAmodule
And penalty2.m should start with:
function [fitness]=penalty2(chromosome,available,bc,Dof,E,f,fixedcoord,na,nb,neft,ne,vt,nl,nn,numbitCoordX,numbitCoordY,numbitEdof,numbitEp,sq,TOPGSM,xspan,yspan);
And bintranslate.m should start with:
function [Coord,Edof,Ep]=bintranslate(available,chromosome,Dof,fixedcoord,na,nb,neft,nevt,nl,nn,numbitCoordX,numbitCoordY,numbitEdof,numbitEp,xspan,yspan);
And FEM2.m should start with:
function [Ed,Ex,Ey,v1,v2,w,wrong]=FEM2(bc,Coord,Dof,E,Edof,Ep,f,neft,nevt,sq,TOPGSM);