new_system
Create and load an empty nflow model.
📝Syntax
h = new_system()
h = new_system(name)
📥Input Arguments
Parameter Description
name a string: a valid model identifier. When omitted, an automatic name is generated (untitled, untitled1, ...).
📤Output Arguments
Parameter Description
h a double: a handle to the loaded model.
📄Description

new_system creates an empty nflow model and registers it as loaded. The model is addressed later either by its returned handle or by its name.

Blocks are added with add_block, connected with add_line or NFlow.connectBlocks, configured with set_param, saved with save_system and opened in the editor with open_system.

💡Examples
new_system('demo');
add_block('nflow/source/sine', 'demo/Sine');
add_block('nflow/math/gain', 'demo/Gain', 'gain', 2);
add_block('nflow/sink/scope', 'demo/Scope');
add_line('demo', 'Sine/1', 'Gain/1');
add_line('demo', 'Gain/1', 'Scope/1');
set_param('demo', 'StopTime', 10);
save_system('demo', [tempdir(), 'demo.nflow']);
bdclose('demo');
🔗See Also
add_blockadd_lineset_paramsave_systemclose_system
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub