How to add the wiring of two resistors in SIMULINK through the MATLAB code
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kaiyuan Luo
am 27 Sep. 2021
Kommentiert: Kaiyuan Luo
am 10 Okt. 2021
I want to add the wiring of two resistors through the code. As shown in the figure, I first added the Resistor999 module using the code, and then added two resistors, Resistor and Resistor1, and made the connection as shown in the figure in Simulink. I want to add the connection on the right side of Resistor999 and the left side of Resistor1 through the Matlab code.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/750829/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/750829/image.png)
First use get_param to find out that LConn and RConn in LineHandles should be related to the resistance interface, try to use add_line to add a connection line, but no matter how you try, Invalid Simulink object name is displayed. How to use code for help, thank you!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/750834/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/750839/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/750844/image.png)
I would also like to ask how to add the resistor to the specified position through the code, and how to delete the specific connection through the code, thank you!
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!