% Variant control variable
V = Simulink.VariantControl('Value', 1, 'ActivationTime', 'update diagram');

% Variant parameters
K1 = Simulink.VariantVariable('Choices', {'V == 1', 3.5, 'V == 2', 8.5});
K2 = Simulink.VariantVariable('Choices', {'V == 1', 4.5, 'V == 2', 9.5});