Simulink: Randomize connections between blocks (connect blocks randomly)
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
In my model I have two springs attached to each other. Force (signal) is applied to one of the springs. Both springs reacting on the force, since they are connected - output of the first spring connected to the input of second spring, as well as output of second spring connected to the input of first one)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151449/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151451/image.jpeg)
.
What I need is to have 40 springs randomly connected to each other.
I can copy "spring module" 40 times, but is there a way to randomize connections between them in Simulink? Is there any other way to perform this task?
Thank you
0 件のコメント
回答 (1 件)
Kaustubha Govind
2013 年 3 月 4 日
You could write a MATLAB function to randomize the connections. Connections can be made with add_line in a MATLAB function.
参考
カテゴリ
Help Center および File Exchange で Mechanical Models についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!