function [rz] = initializeRz(args) arguments args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible' end rz = struct(); switch args.type case 'none' rz.type = 0; case 'rigid' rz.type = 1; case 'flexible' rz.type = 2; end % Spindle - Slip Ring rz.slipring.density = 7800; % [kg/m3] rz.slipring.STEP = 'Spindle_Slip_Ring.STEP'; % Spindle - Rotor rz.rotor.density = 7800; % [kg/m3] rz.rotor.STEP = 'Spindle_Rotor.STEP'; % Spindle - Stator rz.stator.density = 7800; % [kg/m3] rz.stator.STEP = 'Spindle_Stator.STEP'; rz.K = [7e8; 7e8; 2e9; 1e7; 1e7; 1e7]; rz.C = [4e4; 4e4; 7e4; 1e4; 1e4; 1e4]; if exist('./mat', 'dir') if exist('./mat/nass_stages.mat', 'file') save('mat/nass_stages.mat', 'rz', '-append'); else save('mat/nass_stages.mat', 'rz'); end elseif exist('./matlab', 'dir') if exist('./matlab/mat/nass_stages.mat', 'file') save('matlab/mat/nass_stages.mat', 'rz', '-append'); else save('matlab/mat/nass_stages.mat', 'rz'); end end