Set a workspace variable
cm_set_workspace_varSet a MATLAB base or Simulink model workspace variable or field, logging the old value so cm_revert_all can restore it. Model changes stay in memory until cm_model_save and require an idle simulation.
Instructions
Set a variable or field. The old value is logged and cm_revert_all restores it. Model-workspace changes live in memory until cm_model_save. Requires an idle simulation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Variable or field, e.g. 'Kp_12' or 'Table.Value' | |
| scope | No | 'base' for the MATLAB base workspace, or the name of a loaded Simulink model for that model's workspace | base |
| value | Yes | Number, string, list or nested list (matrix) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||