Montecarlo Matlab

This commit is contained in:
Parric007
2024-05-13 12:09:59 +02:00
commit 4a0994aceb
4 changed files with 111 additions and 0 deletions

27
Bounds.m Normal file
View 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