% define tunable parameters in base workspace as Simulink.Parameter objects

%   Copyright 2011-2019 The MathWorks, Inc.

% tunable parameter mapped to local variable
K1 = Simulink.Parameter;
K1.Value = 0.1;
K1.CoderInfo.StorageClass = 'Model default';

% tunable parameter mapped to global variable
K2 = Simulink.Parameter;
K2.Value = 0.2;
K2.CoderInfo.StorageClass = 'ExportedGlobal';

% tunable parameter mapped to global const
K3 = Simulink.Parameter;
K3.Value = 0.3;
K3.CoderInfo.StorageClass = 'Custom'; 
K3.CoderInfo.CustomStorageClass = 'Const'; 