Files
MonteCarlo-Matlab/LinearBounds.m
2024-05-13 12:09:59 +02:00

26 lines
588 B
Matlab

classdef LinearBounds
%LINEARBOUNDS Summary of this class goes here
% Detailed explanation goes here
properties
lower double
higher double
end
methods
function obj = LinearBounds(lowerIn,higherIn)
obj.lower = lowerIn;
obj.higher = higherIn;
end
function outputArg = length(obj)
outputArg = abs(obj.higher-obj.lower);
end
function outputArg = getRandomValue(obj)
outputArg = obj.lower + (rand() * obj.length);
end
end
end