bdroot
Return the top-level model of a block path.
📝Syntax
root = bdroot(obj)
📥Input Arguments
Parameter Description
obj a model name or a block path ('model' or 'model/BlockName').
📤Output Arguments
Parameter Description
root the top-level model name (the part before the first '/').
📄Description

bdroot returns the top-level model of a block path.

bdroot('model') is 'model'; bdroot('model/Sub/Blk') is 'model'. The root model must be loaded.

💡Examples
new_system('demo');
add_block('nflow/math/gain', 'demo/Gain');
root = bdroot('demo/Gain')
bdclose('demo');
🔗See Also
find_systemnew_systemget_param
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub