Commit 129f0997 by Chiara Antonini

Upload new file

1 parent eaa03183
%Class representing a latin hypercube generated through the function
%lhsdesign. The object LatinHypercube has the following properties:
% -Nsample is the number of samples of the hypercube
% -LBpi and UBpi are, respectively, the lower and upper boundaries of the
% interval in which the hypercube is centered
classdef LatinHypercube
properties
LBpi
UBpi
Nsample
end
methods
function obj=LatinHypercube(lb,ub,ns)
obj.LBpi=lb;
obj.UBpi=ub;
obj.Nsample=ns;
end
function perturbation=generate_sample(obj,len_p)
perturbation=obj.LBpi+(obj.UBpi-obj.LBpi).*lhsdesign(obj.Nsample,len_p);
end
end
end
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!