[matlab]Removing a block and making connections
来源:互联网 发布:淘宝客 php 编辑:程序博客网 时间:2024/06/05 05:51
function removeAndReconnectBlock(blockHandle)
%Get port handles and parent systemportHandles = get_param(blockHandle,'PortHandles');sys = get_param(blockHandle,'Parent');
%Get source portsrcSignal = get_param(portHandles.Inport,'Line');srcPort = get_param(srcSignal,'SrcPortHandle');
%Get destination portdestSignal = get_param(portHandles.Outport,'Line');destPort = get_param(destSignal,'DstPortHandle');
%Removedelete_line(destSignal);delete_line(srcSignal);delete_block(blockHandle);
%Reconnectadd_line(sys,srcPort,destPort)
The following works for me using SimScape! Hope it helps.
sbh = getSimulinkBlockHandle([sys '/NameOfYourSpecificBlock']);ph = get_param(sbh,'PortHandles');srcSignal = get_param(ph.RConn,'Line'); % or LConn for left connection of the blockdelete_line(srcSignal);
阅读全文
0 0
- [matlab]Removing a block and making connections
- Making Connections
- Creating and/or Removing a Login Item
- Removing the trailing file name and backslash from a path
- Closing dangling connections. All connections must have a close() in a finally block.
- We are already in the process of making 6 connections and the number of simultan
- making 11 connections and the number of simultaneous builds has been throttled to 10
- Removing a detached instance
- Making a small Lisp project with quickproject and Quicklisp
- We are already in the process of making 11 connections and the number of simultaneous builds has be
- proxool--高并发异常:We are already in the process of making 11 connections and the number of simultaneous
- We are already in the process of making n+ connections and the number of simultaneous builds has bee
- QT4 学习 第一章 二 Making Connections
- 【C1】基本学习【S2】Making Connections
- Creating and/or Removing a Login Item(添加/移除登陆项)
- Adding And Removing Remote Branches
- Making And Using Library
- Making a Kite
- 免安装版的Tomcat 的基本配置
- 关于Activity的onNewIntent方法调用时机
- Activity的启动模式记录
- Android进阶之关于开源库(框架)的知识点记录
- 获取手机网络状态之ConnectivityManager
- [matlab]Removing a block and making connections
- 手机网站表层div滑动,导致底层body滑动(touchmove的阻止)
- Unicode编码区分
- Android的Fragment的自定义转场动画
- Error:Conflict with dependency 'com.google.code.findbugs:jsr305' in project '
- Maven工程 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- JS判断是电脑浏览器还是手机端浏览器,并根据不同的终端跳转到不同的网址
- serviceImpl中,方法加@Override注释后报错
- Android 4.4全屏模式 沉浸模式报错:SYSTEM_UI_FLAG_IMMERSIVE cannot be resolved or is not a