Is it possible to access simscape to build a physical model from the command line?
8 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
Steve Miller
2015 年 4 月 10 日
編集済み: Steve Miller
2015 年 4 月 10 日
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
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!