phd-simscape-nano-hexapod/matlab/src/initializeController.m

25 lines
634 B
Mathematica
Raw Normal View History

2025-02-07 18:00:49 +01:00
function [] = initializeController(args)
arguments
2025-02-12 10:42:44 +01:00
args.type char {mustBeMember(args.type,{'open-loop', 'iff'})} = 'open-loop'
2025-02-07 18:00:49 +01:00
end
controller = struct();
switch args.type
case 'open-loop'
controller.type = 1;
controller.name = 'Open-Loop';
case 'iff'
2025-02-12 10:42:44 +01:00
controller.type = 2;
2025-02-07 18:00:49 +01:00
controller.name = 'Decentralized Integral Force Feedback';
end
if exist('./mat', 'dir')
save('mat/nano_hexapod_model_controller.mat', 'controller');
elseif exist('./matlab', 'dir')
save('matlab/mat/nano_hexapod_model_controller.mat', 'controller');
end
end