What Happened to the SrcWorkspace Name-Value Input to the sim() Command?
Show older comments
The SrcWorkspace Name-Value pair argument to the sim() command seems to have disappeared going from 2020b to 2021a. I searched the 2021a Release Notes and could find no mention of its removal. Did I miss that in the ReleaseNotes? More importantly, how does one implement that functionality now?
Answers (2)
Paul
on 31 Aug 2021
1 vote
1 Comment
Tamas Rozsa
on 7 Jan 2022
Edited: Tamas Rozsa
on 7 Jan 2022
True.
In fact, 'SrcWorkspace' is also buggy and does not work well with data dictionaries (see e.g. https://www.mathworks.com/matlabcentral/answers/367223-using-srcworkspace-with-data-dictionaries), so Simulink.SimulationInput seems to be the way to go.
Another reason to avoid 'SrcWorkspace' might be that it seems to have issues also when using with the parallel computing command 'parfor' (see e.g. https://www.mathworks.com/matlabcentral/answers/94215-how-can-i-set-the-source-workspace-to-caller-when-using-a-the-sim-command-from-a-function-in-simul).
Felipe Padua
on 16 Jul 2022
0 votes
It's present in R2022a documentation.
3 Comments
Paul
on 16 Jul 2022
Felipe Padua
on 16 Jul 2022
Yes, it's very strange.
Paul
on 16 Jul 2022
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!