- From Workspace Block:
- Use the From Workspace block in your Simulink model. This block reads data from a workspace and provides it as a signal or a nonvirtual bus at the block’s output1.
- To read more about "From Workspace" block, click the link below - https://www.mathworks.com/help/simulink/slref/fromworkspace.html
- Specify the data you want to load using the Data parameter. You can use a MATLAB expression (e.g., a variable name) that evaluates to data in a format supported by the block.
- Connect the output of the From Workspace block to your desired location in your model.
- If you’re logging data using a To Workspace block, you can access the logged data using the variable name specified in the Variable name parameter of the block2.
- Use a dot notation with the variable name to access specific columns or elements.For example:
- Alternatively you could also create a Simulink.ModelWorkspace object to interact with the model workspace of your Simulink model.
- This allows you to store and retrieve parameters or variables associated with the model.
- To learn more about this click the link below - https://www.mathworks.com/help/simulink/slref/simulink.modelworkspace.html