Simulink generate input at begining of simulations
3 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I want to simulate system behavior for input events with random characteristics.
As I want to study many parameters of the random event characteristics, it is not feasible to generate data in large quanities and store it in a matfile.
My plan is to create an event generator block, that has the event parameters as arguments.
So far my idea is to use a Start function to generate the actual event at the begining of a simulation from those parameters.
How can I get the signal generated in that start function to be the output of my event generator?
0 个评论
回答(1 个)
Jim Riggs
2022-11-15
编辑:Jim Riggs
2022-11-15
I am not sure that I understand your specific question (i.e. the implementation you are describing).
The way it sounds to me, you want to run your model for a large number of different starting conditions. To do this, I would run the Simulink model from a Matlab script. This script would have a section where the initial parameters for the model are defined, then run the Simulink model using the 'sim' command. The simulink model can refer to variables defined in the Matlab workspace.
You can build a loop structure to run your Simulink model many times, and the model can export data using the '"to workspace" block which you can then manipiulate or save for further reference.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!