Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Is anyone can solve a programmable matlab code for connections in Simulink ?

1 visualizzazione (ultimi 30 giorni)
Hi, I am adding a small script that create figure Dmux_2_tag(attached):
no_cells = 8;
AddGoto1=zeros(no_cells,1);
PH_AddGoto1=cell(no_cells,1);
Dmux_AddGoto1=zeros(no_cells,1);
%%%handle for Demux:
Dmuxx=find_system(mdl,'LookUnderMasks','All','FindAll','on','Name','Demux');
set(Dmuxx,'Outputs',num2str(no_cells))
PH_Dmuxx=get(Dmuxx,'PortHandles');
%%%N cells by definition --> no_cells.
for l=1:no_cells
nl=num2str(l);
%%%add goto_1:
AddGoto1(l)=add_block('simulink/Signal Routing/Goto', [mdl,'/gmod_1',nl]);
posg = get(AddGoto1(l),'Position');
set(AddGoto1(l),'Position',posg + [200 200*(l-1)-176 215 200*(l-1)-176])
set(AddGoto1(l),'GotoTag',['mod_1',nl]) %%- set tag
%%%get port handle
PH_AddGoto1{l}=get(AddGoto1(l),'PortHandles');
%%%connect Demux to AddGoto blocks PH_Muxx_in
Dmux_AddGoto1(l) = add_line(mdl,PH_Dmuxx.Outport(l),PH_AddGoto1{l}.Inport);
end
I want to change the code to create plot as discribe in figure Dmux_2_mux_tag.
From my understanding, I need to add addition mux declaration to original code and set all the connections...in code..
Is anyone can assist to solve it ?
Thanks, Henry

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by