How do I use LHS(Latin Hypercube Sampling)?

조회 수: 10 (최근 30일)
민제 강
민제 강 2021년 5월 12일
답변: Jesús Zambrano 2021년 5월 31일
x1=[-5,10]
x2=[0,15]
Branin function= @(x) (x(:,2)-5.1*x(:,1).^2./(4*pi^2)+5*x(:,1)./pi-6).^2 + 10*(1-1/(8*pi))*cos(x(:,1))+10;
n=30
d=2
X = lhsdesign(n,d);
I'd like to get the values from the boundary and objective functions.
Please let me know.

답변 (1개)

Jesús Zambrano
Jesús Zambrano 2021년 5월 31일
You could try with:
lb = [-5 0];
ub = [10, 15];
x = bsxfun(@plus, lb, bsxfun(@times, X, (ub-lb)); %new sample distribution
z = myfunction(x); % values of the objective function

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by