Montecarlo Matlab
This commit is contained in:
27
Bounds.m
Normal file
27
Bounds.m
Normal file
@@ -0,0 +1,27 @@
|
||||
classdef Bounds
|
||||
%BOUNDS Summary of this class goes here
|
||||
% Detailed explanation goes here
|
||||
|
||||
properties
|
||||
x LinearBounds
|
||||
y LinearBounds
|
||||
end
|
||||
|
||||
methods
|
||||
function obj = Bounds(xIn,yIn) %BOUNDS Construct an instance of this class
|
||||
% Detailed explanation goes here
|
||||
obj.x = xIn;
|
||||
obj.y = yIn;
|
||||
end
|
||||
|
||||
function outputArg = area(obj)
|
||||
%METHOD1 Summary of this method goes here
|
||||
% Detailed explanation goes here
|
||||
outputArg = obj.x.length * obj.y.length;
|
||||
end
|
||||
function outputArg = getRandomPoint(obj)
|
||||
outputArg = Point(obj.x.getRandomValue, obj.y.getRandomValue);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user