Is it possible to access simscape to build a physical model from the command line?
Mostrar comentarios más antiguos
Hey guys,
I'm working on some CT scan photos in matlab. After some processing steps, I'd like to make an electric circuit by putting resistors at different positions and connect them according to the pattern in the image. To do so, I need to have access to simscape from the matlab command line. It's not a complicated electric circuit. I've got only resistors and the objective is to calculate the equivalent resistance of the whole network. However, I don't know if it's possible to use simscape from command line or not.
Any idea or hint is appreciated. cheers
Respuestas (1)
Steve Miller
el 10 de Abr. de 2015
Editada: Steve Miller
el 10 de Abr. de 2015
0 votos
Hi bob,
add_line() and add_block() work with Simscape blocks. You can use these to construct your circuit.
Attached to this answer is the file "ML_Build_MyElecModel.m" with MATLAB code that builds a simple electrical circuit. It shows how to add, position, orient, and configure the blocks, as well as how to connect them with Simscape electrical connections. The code also runs the model and plots the results using Simscape logging
There is a submission on the MATLAB Central File Exchange that shows how to use MATLAB to automate the construction of a SimMechanics model. The submission "SimMechanics Model from MATLAB Code" shows how to add blocks and connect them using MATLAB commands. The same commands work for Simscape blocks, too.
Hope this helps!
--Steve
1 comentario
FEI XIAO
el 22 de Dic. de 2018
Steve, many thanks to you!
Categorías
Más información sobre Troubleshooting en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!