Filter löschen
Filter löschen

Optimization,input variables with n set of values

1 Ansicht (letzte 30 Tage)
veena mathew
veena mathew am 9 Nov. 2020
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

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by