Removed the passing of the Simulator object as an argument.

This commit is contained in:
Karthik 2021-07-14 20:12:08 +02:00
parent d8a43ad153
commit 69358ded5f

View File

@ -1,4 +1,4 @@
function plotPositionAndVelocitySampling(obj, NumberOfBins) function plotPositionAndVelocitySampling(NumberOfBins, initialPositions, initialVelocities)
f_h = Helper.getFigureByTag('RejectionSampling'); f_h = Helper.getFigureByTag('RejectionSampling');
set(groot,'CurrentFigure',f_h); set(groot,'CurrentFigure',f_h);
@ -13,9 +13,6 @@ function plotPositionAndVelocitySampling(obj, NumberOfBins)
screensize = get(0,'ScreenSize'); screensize = get(0,'ScreenSize');
f_h.Position = [[screensize(3)/7 screensize(4)/7] 1.357e+03 770]; f_h.Position = [[screensize(3)/7 screensize(4)/7] 1.357e+03 770];
initialPositions = obj.InitialPositions;
initialVelocities = obj.InitialVelocities;
subplot(3,2,1) subplot(3,2,1)
histogram(initialPositions(:, 1)*1e3,NumberOfBins, 'LineStyle', 'none', 'DisplayName','x-Component') histogram(initialPositions(:, 1)*1e3,NumberOfBins, 'LineStyle', 'none', 'DisplayName','x-Component')
xlabel('Positions (mm)','FontSize', 14) xlabel('Positions (mm)','FontSize', 14)