How to know which block connected with outport block in a subsystem?

Hi all,

I have outport block in a subsystem.

In outside subsystem, there is block connect with this outport block.

I want to get property of that outside block by command line.

Do any know?

ANSWER provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

For your specific query, follow these steps:

First get the line handles of your chosen subsystem.

blk_lines = get_param('model/subsystem','LineHandles');

Then use the ‘DstBlockHandle’ property of the outport lines to get the destination block handles. For the full path of these blocks, use ‘getfullname’ on the handles.

plant_handle = getfullname(get_param(blk_lines.Outport,'DstBlockHandle'));

Here, if your chosen subsystem has multiple outports connecting to multiple blocks, ‘plant_handle’ is a cell array with the elements being character vectors containing the paths of all the destination blocks. If there is only one outport connecting to a single block, ‘plant_handle’ is a character vector containing the path of that destination block.

Now that you have the path(s) of the destination block(s), you can get any object parameter


Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.