How do I use LHS(Latin Hypercube Sampling)?
    15 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
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.
0 commentaires
Réponses (1)
  Jesús Zambrano
    
 le 31 Mai 2021
        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
0 commentaires
Voir également
Catégories
				En savoir plus sur Software Development Tools dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

