MATLAB: What does it mean to ‘Update Diagram’ in Simulink

compilationctrlctrl-dctrl+dddiagramphasesimulink

I am looking for documentation on the result of selecting 'Update Diagram' in Simulink.

Best Answer

Documentation on the 'Update Diagram' functionality is missing from Simulink.
Here is additional information on 'Update Diagram':
The Simulink compilation phase propagates signal and sample time attributes. It is equivalent to selecting the "Edit -> Update Diagram" (Ctrl-D) menu item from the Simulink menubar.
Before every simulation and when the user requests it, Simulink performs an 'Update Diagram' (Ctrl-D) to ready the model for simulation. During the update process, Simulink does the following:
1. Evaluates the model's block parameter expressions to determine their values.
2. Determines signal attributes, e.g., name, data type, numeric type, and dimensionality, not explicitly specified by the model and checks that each block can accept the signals connected to its inputs.
Simulink uses a process called attribute propagation to determine unspecified attributes. This process entails propagating the attributes of a source signal to the inputs of the blocks that it drives.
3. Performs block reduction optimizations.
4. Flattens the model hierarchy by replacing virtual subsystems with the blocks that they contain.
5. Determines the block sorted order (see Controlling and Displaying the Sorted Order for more information).
6. Determines the sample times of all blocks in the model whose sample times you did not explicitly specify.
7. Evaluates the INITFCN callbacks for the model and blocks in the model.
Stateflow and Embedded MATLAB Function blocks perform simulation through code generation, which means that 'Update Diagram' would also generate and compile code for these blocks.