필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
Henry Buck
Henry Buck 2017년 4월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
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

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by