2020-01-13 11:42:31 +01:00
|
|
|
function [sample] = initializeSample(sample)
|
|
|
|
arguments
|
|
|
|
sample.radius (1,1) double {mustBeNumeric, mustBePositive} = 100
|
|
|
|
sample.height (1,1) double {mustBeNumeric, mustBePositive} = 300
|
|
|
|
sample.mass (1,1) double {mustBeNumeric, mustBePositive} = 50
|
|
|
|
sample.offset (1,1) double {mustBeNumeric} = 0
|
|
|
|
sample.color (1,3) double {mustBeNumeric} = [0.45, 0.45, 0.45]
|
2018-06-16 22:57:54 +02:00
|
|
|
end
|
2019-07-15 11:07:24 +02:00
|
|
|
|
2018-10-25 11:00:30 +02:00
|
|
|
%%
|
|
|
|
sample.k.x = 1e8;
|
2019-11-22 10:36:26 +01:00
|
|
|
sample.c.x = 0.1*sqrt(sample.k.x*sample.mass);
|
2018-06-16 22:57:54 +02:00
|
|
|
|
2018-10-25 11:00:30 +02:00
|
|
|
sample.k.y = 1e8;
|
2019-11-22 10:36:26 +01:00
|
|
|
sample.c.y = 0.1*sqrt(sample.k.y*sample.mass);
|
2018-10-25 11:00:30 +02:00
|
|
|
|
|
|
|
sample.k.z = 1e8;
|
2019-11-22 10:36:26 +01:00
|
|
|
sample.c.z = 0.1*sqrt(sample.k.z*sample.mass);
|
2018-10-25 11:00:30 +02:00
|
|
|
|
|
|
|
%% Save
|
2018-10-11 10:25:57 +02:00
|
|
|
save('./mat/stages.mat', 'sample', '-append');
|
2018-06-16 22:57:54 +02:00
|
|
|
end
|