필터 지우기
필터 지우기

Optimization,input variables with n set of values

조회 수: 1 (최근 30일)
veena mathew
veena mathew 2020년 11월 9일
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