add all files
This commit is contained in:
24
A5-simscape-nano-hexapod/src/initializeController.m
Normal file
24
A5-simscape-nano-hexapod/src/initializeController.m
Normal file
@@ -0,0 +1,24 @@
|
||||
function [] = initializeController(args)
|
||||
|
||||
arguments
|
||||
args.type char {mustBeMember(args.type,{'open-loop', 'iff'})} = 'open-loop'
|
||||
end
|
||||
|
||||
controller = struct();
|
||||
|
||||
switch args.type
|
||||
case 'open-loop'
|
||||
controller.type = 1;
|
||||
controller.name = 'Open-Loop';
|
||||
case 'iff'
|
||||
controller.type = 2;
|
||||
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
|
Reference in New Issue
Block a user