add block from custom library simulink

4 次查看(过去 30 天)
Hi everybody,
i want to build up my simulink/simscape model from matlab command line. The command what i am using at the moment for built in simscape blocks is the following:
add_block('built-in/Scope', [sys '/Scope1'])
When I try to add a block from a custom library like this:
add_block('test_lib/Heat_out',[sys '/test'], 'Position', [(x+offset) y+offset (x+offset)+w (y+offset)+h])
I get the following error: Unable to load block diagram 'test_lib'
Can someone help me with this issue? Thanks in advance!
EDIT: I know how to do it if my library simulink model is in my path. But is there a way of doing it out of the simulink library browser if the library model is not in my path?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by