Info
This question is closed. Reopen it to edit or answer.
Updating data in workspace
2 views (last 30 days)
Show older comments
Hi,
I wrote a .m file which produces some data in workspace. I want to use the data when I am running my model in simulink. It is possible to stop the model and then use the data, but how can I use the data when the model is running? After searching about my problem, I have found that assignin() can be useful. Can someone tell me how can I use the function? An example can be very helpful.
Thanks
2 Comments
C.J. Harris
on 14 Nov 2012
I don't think assignin will help you. You'll need to access the Simulink API during run-time from a GUIDE application or similar. But really you want to find an alternative solution as updating Simulink parameters while the model is running is not usually best practice.
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!