"Type mismatch in input arguments" error when using "add_line()"

6 views (last 30 days)
Hello !
I'm trying to connect a subsystem with a port with the function add_line() :
allOutportBlock = find_system(sprintf('%s/%s', component_NameValue, subsystem_NameValue),'BlockType','Outport');
for element = allOutportBlock(:)'
add_block('simulink/Ports & Subsystems/Out1',[component_NameValue '/' block_name]);
add_line(sprintf('%s',component_NameValue), element, sprintf('%s/%s',component_NameValue, block_name));
end
But i have the error "Type mismatch in input arguments" and i don't know where is the problem
Thanks you !

Answers (0)

Categories

Find more on Programmatic Model Editing 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!