MATLAB R2024a is now obtainable, and quite a lot of new necessary options have been added to Simulink. Listed below are my high 5.
Simulation object
% Run the primary a part of the simulation with okay=0.2
% Run the second half with okay=1.5
Design Research
![](https://blogs.mathworks.com/simulink/files/WhatsNew24a_1-1.png)
I specify 5 mass values and 5 damping values, and simulate an exhaustive mixture for a complete of 25 simulation
kVar = simulink.multisim.Variable(‘c’,1:5);
cVar = simulink.multisim.Variable(‘m’,1:5);
fullSpace = simulink.multisim.Exhaustive([kVar cVar]);
myDesignStudy = simulink.multisim.DesignStudy(mdl, fullSpace);
outH = parsim(myDesignStudy,‘ShowProgress’,‘Off’,‘UseFastRestart’,‘on’);
out = fetchOutputs(outH);
Specifying Variant Configurations utilizing a SimulationInput object
mdl = ‘sldemo_variant_subsystems’;
load(‘variantConfigs.mat’); % load pre-saved variant configuration information
vcd = Simulink.VariantManager.getConfigurationData(mdl);
N = size(vcd.Configurations);
in(1:N) = Simulink.SimulationInput(mdl);
in(i) = in(i).setVariantConfiguration(vcd.Configurations(i).Identify);
out = sim(in,‘ShowProgress’,‘off’);
Simplified Mechanism to entry Information Dictionaries
Earlier than R2024a, in the event you needed to programmatically change the worth of a parameter saved in a knowledge dictionary, you needed to write code like this:
myDictionaryObj = Simulink.information.dictionary.open(‘simplesystemDD.sldd’);
dDataSectObj = getSection(myDictionaryObj,‘Design Information’);
kObj = getEntry(dDataSectObj,‘okay’);
h = Simulink.information.join(‘simplesystemDD.sldd’);
Protect alignment when shifting and resizing blocks
Let’s shut this listing with a easy quality-of-life modifying enchancment. This isn’t a game-changer like a number of the earlier highlights however will hopefully enhance your modifying expertise.
When deciding on a block, you may discover a light-weight inexperienced highlighting on connections and blocks round it. Which means now we have detected that these connections and blocks ought to doubtless transfer with the blocks.
![MoveBlocks.gif](https://blogs.mathworks.com/simulink/files/WhatsNew24a_2-1.gif)
Similar works with resizing:
![](https://blogs.mathworks.com/simulink/files/WhatsNew24a_3-1.gif)
Now it is your flip