7575aee987
Lot's of new things: - try to use less .mat files - computation of setpoint and error in the cartesian frame fixed to the granite - change of base to have the errors w.r.t. the NASS base - add script to plot setpoint, position and error
20 lines
570 B
Matlab
20 lines
570 B
Matlab
function [] = initializeSample(opts_param)
|
|
%% Default values for opts
|
|
sample = struct('radius', 100, ...
|
|
'height', 300, ...
|
|
'mass', 50, ...
|
|
'offset', 0, ...
|
|
'color', [0.45, 0.45, 0.45] ...
|
|
);
|
|
|
|
%% Populate opts with input parameters
|
|
if exist('opts_param','var')
|
|
for opt = fieldnames(opts_param)'
|
|
sample.(opt{1}) = opts_param.(opt{1});
|
|
end
|
|
end
|
|
|
|
%% Save if no output argument
|
|
save('./mat/stages.mat', 'sample', '-append');
|
|
end
|