- MATLAB中用遗传算法求解约束非线性规划问题 Solution of optimization with nonliear constraints programming by genetic alogorithm in MATLAB 作者:王勇, 期刊-核心期刊 哈尔滨商业大学学报(自然科学版)JOURNAL OF HARBIN UNIVERSITY O
n=length(G);if n==2 format long e %rat syms x1 x2 f=1/2*[x1,x2]*G*[x1;x2]+b'*[x1;x2]+c;g=[diff(f,x1);diff(f,x2)];g1=subs(subs(g,x1,X(1,1)),x2,X(2,1));d=-g1;