Optimization,input variables with n set of values

1 次查看(过去 30 天)
I am trying with gamult optimization for multichannel luminaire. there are three optimizing variables(x1,x2,x3). But i need to start the optimization with n set of variables and get n-set of x1,x2,x3 as result(for multichannels). The below code uses n=1(single channel).
function y= sampleopt(x)
sigma=x(2)/2.35482;
spd=zeros(401,2);
X=zeros(401,1);
for lambda=380:780
spd(lambda-379, 1)=lambda;
spd(lambda-379, 2)=x(3)*((exp(-0.5*((lambda-x(1))/sigma^2))/(sigma*sqrt(2*pi)))); % spd of one channel
X(lambda-379,1)=lambda;
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by