h = new_system()
h = new_system(name)
| Parameter | Description |
|---|---|
| name | a string: a valid model identifier. When omitted, an automatic name is generated (untitled, untitled1, ...). |
| Parameter | Description |
|---|---|
| h | a double: a handle to the loaded model. |
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.
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');
| Version | Description |
|---|---|
| 1.0.0 | initial version |