function [ground] = initializeGround(args) arguments args.type char {mustBeMember(args.type,{'none', 'solid'})} = 'solid' end ground = struct(); switch args.type case 'none' ground.type = 0; case 'solid' ground.type = 1; end ground.shape = [2, 2, 0.5]; % [m] ground.density = 2800; % [kg/m3] save('./mat/stages.mat', 'ground', '-append');