How can i add simscape block programmatically

I konw how to add the basic simulink block programmatically. But when i use the same method, there is always something went wrong with the path name of the block source. How should i specifiy the name of the block source path properly?
add_block('simscape/Electrical/Specialized Power Systems/Fundamental Blocks/Mutual Inductance','Model_auto_generation_Mutual_inductance_considered')
Unbenannt.png

2 Comments

If you open Simulink Library and hover the mouse over the block you want, the proper block path will show up.
Hi Yifeng,
Thanks for your answer. It worked.

Sign in to comment.

Answers (1)

Looks like Yifeng's comment answered your question:
If you open Simulink Library and hover the mouse over the block you want, the proper block path will show up.
If you have a follow-up question, let us know.

Products

Release

R2018b

Asked:

Sam
on 29 Aug 2019

Answered:

on 17 Aug 2020

Community Treasure Hunt

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

Start Hunting!