LatinHypercube.m 773 Bytes
%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