add block from custom library simulink

6 views (last 30 days)
Felix Hoffmann
Felix Hoffmann on 5 Sep 2018
Edited: Felix Hoffmann on 5 Sep 2018
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?

Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!