<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Searching in Simulink</title>
	<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/</link>
	<description>This blog is about Simulink.</description>
	<pubDate>Mon, 23 Nov 2009 01:47:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Peter Raeth</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-640</link>
		<dc:creator>Peter Raeth</dc:creator>
		<pubDate>Mon, 22 Dec 2008 18:37:55 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-640</guid>
		<description>Greetings Seth.

The thread above leads us in a direction we really need to go.

We have a need to retrieve a list of signal names and their associated dimensions from an existing compound bus. The retrived information should be in the form of something that cam be copy/pasted in text form.

Reading the above thread, we can see that the following commands yield a list of all lines in a model. How can we get the list of lines within a specific compound bus and get the format of each line?

allLines = find_system('Dimensions', 'FollowLinks', 'on', 'LookUnderMasks', 'All', 'FindAll', 'on', 'Type', 'line')

lineNames = get_param(allLines, 'Name')

Thank you for whatever insights you can offer.


Best,

Peter.</description>
		<content:encoded><![CDATA[<p>Greetings Seth.</p>
<p>The thread above leads us in a direction we really need to go.</p>
<p>We have a need to retrieve a list of signal names and their associated dimensions from an existing compound bus. The retrived information should be in the form of something that cam be copy/pasted in text form.</p>
<p>Reading the above thread, we can see that the following commands yield a list of all lines in a model. How can we get the list of lines within a specific compound bus and get the format of each line?</p>
<p>allLines = find_system(&#8217;Dimensions&#8217;, &#8216;FollowLinks&#8217;, &#8216;on&#8217;, &#8216;LookUnderMasks&#8217;, &#8216;All&#8217;, &#8216;FindAll&#8217;, &#8216;on&#8217;, &#8216;Type&#8217;, &#8216;line&#8217;)</p>
<p>lineNames = get_param(allLines, &#8216;Name&#8217;)</p>
<p>Thank you for whatever insights you can offer.</p>
<p>Best,</p>
<p>Peter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raja</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-629</link>
		<dc:creator>Raja</dc:creator>
		<pubDate>Fri, 05 Dec 2008 12:24:52 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-629</guid>
		<description>Dear Seth

I have been in Matlab for the past one month .
Can u tell me what is LineChildren is all about.
I don have any idea about this.</description>
		<content:encoded><![CDATA[<p>Dear Seth</p>
<p>I have been in Matlab for the past one month .<br />
Can u tell me what is LineChildren is all about.<br />
I don have any idea about this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ali</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-578</link>
		<dc:creator>ali</dc:creator>
		<pubDate>Thu, 16 Oct 2008 11:02:01 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-578</guid>
		<description>dear seth,
i would like to design PID controller in matlab/simulink for control the process trainer.
please help.
i think my designed was wrong....</description>
		<content:encoded><![CDATA[<p>dear seth,<br />
i would like to design PID controller in matlab/simulink for control the process trainer.<br />
please help.<br />
i think my designed was wrong&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kieran Parsons</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-254</link>
		<dc:creator>Kieran Parsons</dc:creator>
		<pubDate>Mon, 26 May 2008 13:13:24 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-254</guid>
		<description>@Seth (13) - Thanks for the info. I would like to programmatically add viewers to a model, but there is no API to do this. Instead I think I can copy a viewer from one model into another and change the port it is connected to. For this the ability to find viewers in a model is useful.</description>
		<content:encoded><![CDATA[<p>@Seth (13) - Thanks for the info. I would like to programmatically add viewers to a model, but there is no API to do this. Instead I think I can copy a viewer from one model into another and change the port it is connected to. For this the ability to find viewers in a model is useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malte</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-251</link>
		<dc:creator>Malte</dc:creator>
		<pubDate>Sun, 25 May 2008 20:58:03 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-251</guid>
		<description>Hi,

I want to detect which block are connected to each other. 

(1) Discover all e.g. sum blocks by find_system.

(2) Discover all blocks connected to the found sum blocks. 

Any idea of how to do (2)?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I want to detect which block are connected to each other. </p>
<p>(1) Discover all e.g. sum blocks by find_system.</p>
<p>(2) Discover all blocks connected to the found sum blocks. </p>
<p>Any idea of how to do (2)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-229</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Sat, 17 May 2008 04:39:53 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-229</guid>
		<description>@Kieran Parsons - What are you trying to do with the results of this command?  There is a utility you can download from &lt;a href="http://www.mathworks.com/support/solutions/data/1-1TFIMF.html?solution=1-1TFIMF" rel="nofollow"&gt;this technical support solution&lt;/a&gt; which will allow you to find all the signal viewers in your model.  Try it out.</description>
		<content:encoded><![CDATA[<p>@Kieran Parsons - What are you trying to do with the results of this command?  There is a utility you can download from <a href="http://www.mathworks.com/support/solutions/data/1-1TFIMF.html?solution=1-1TFIMF" rel="nofollow">this technical support solution</a> which will allow you to find all the signal viewers in your model.  Try it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kieran Parsons</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-226</link>
		<dc:creator>Kieran Parsons</dc:creator>
		<pubDate>Fri, 16 May 2008 19:50:12 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-226</guid>
		<description>Is it possible to use find_system to find viewers? If I have a viewer in my model (eg a Scope) then I can access it to change some parameters by using its name (eg my_system/Scope) or its handle. However, if I use find_system I cannot find it (even with FindAll set to 'on').

Note that if I run find_system('my_system/Scope') it does get found (as a check to whether viewers are totally invisible).

Thanks.</description>
		<content:encoded><![CDATA[<p>Is it possible to use find_system to find viewers? If I have a viewer in my model (eg a Scope) then I can access it to change some parameters by using its name (eg my_system/Scope) or its handle. However, if I use find_system I cannot find it (even with FindAll set to &#8216;on&#8217;).</p>
<p>Note that if I run find_system(&#8217;my_system/Scope&#8217;) it does get found (as a check to whether viewers are totally invisible).</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay Swaminathan</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-64</link>
		<dc:creator>Vijay Swaminathan</dc:creator>
		<pubDate>Tue, 18 Mar 2008 21:29:10 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-64</guid>
		<description>@Joe,

Appreciate the enthusiasm about the doc, definetely second the advice. Just a clarification though, the HELP command does not bring up a text version of the documentation. In general the HELP command dumps the comments at the top of of an M-file into the command window. For MATLAB functions (i.e not user-written), the documentation often contains a lot more information, examples and references (and is written by professional documentation writers).To summarize, use the DOC command to bring up the documentation (preferred) or the HELP command to bring up the comments at the top of a file.</description>
		<content:encoded><![CDATA[<p>@Joe,</p>
<p>Appreciate the enthusiasm about the doc, definetely second the advice. Just a clarification though, the HELP command does not bring up a text version of the documentation. In general the HELP command dumps the comments at the top of of an M-file into the command window. For MATLAB functions (i.e not user-written), the documentation often contains a lot more information, examples and references (and is written by professional documentation writers).To summarize, use the DOC command to bring up the documentation (preferred) or the HELP command to bring up the comments at the top of a file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-61</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Thu, 13 Mar 2008 04:38:16 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-61</guid>
		<description>Great Blogging Seth!  Good to see growing love for Simulink!

To Wei, I offer my humble advice:

2. Great Question!  The answer lies within your reach.  This is actually a great point for everyone who is new to MATLAB/Simulink, or new with using the documentation.
Whenever you have a question with a Simulink Block, you can hit the “Help” button to bring up the documentation page.  But what if you want the help doc for a MATLAB function, not a block?  At the MATLAB command prompt, type:

    doc find_system

If you have the doc loaded on your computer, this will do the same as the “Help” button.  (If you don’t have the doc loaded, you can type:

    help find_system

to get a text based version)
The doc is a great place to answer general questions about functions and blocks.  Try it!  You’ll find the answer to your question, I promise!

3.  If you’re trying to search into referenced models, first use FIND_MDLREFS to get the names of ALL the models (this includes all the referenced models and the root model).  After that, you can use the answer as an input to FIND_SYSTEM.  Try this at the MATLAB command prompt:

    sldemo_mdlref_basic

This will open a model reference demo.  Then try:

    [r, b] = find_mdlrefs('sldemo_mdlref_basic')

And lastly:

    find_system(r)

See what you get?

I hope this helped!</description>
		<content:encoded><![CDATA[<p>Great Blogging Seth!  Good to see growing love for Simulink!</p>
<p>To Wei, I offer my humble advice:</p>
<p>2. Great Question!  The answer lies within your reach.  This is actually a great point for everyone who is new to MATLAB/Simulink, or new with using the documentation.<br />
Whenever you have a question with a Simulink Block, you can hit the “Help” button to bring up the documentation page.  But what if you want the help doc for a MATLAB function, not a block?  At the MATLAB command prompt, type:</p>
<p>    doc find_system</p>
<p>If you have the doc loaded on your computer, this will do the same as the “Help” button.  (If you don’t have the doc loaded, you can type:</p>
<p>    help find_system</p>
<p>to get a text based version)<br />
The doc is a great place to answer general questions about functions and blocks.  Try it!  You’ll find the answer to your question, I promise!</p>
<p>3.  If you’re trying to search into referenced models, first use FIND_MDLREFS to get the names of ALL the models (this includes all the referenced models and the root model).  After that, you can use the answer as an input to FIND_SYSTEM.  Try this at the MATLAB command prompt:</p>
<p>    sldemo_mdlref_basic</p>
<p>This will open a model reference demo.  Then try:</p>
<p>    [r, b] = find_mdlrefs(&#8217;sldemo_mdlref_basic&#8217;)</p>
<p>And lastly:</p>
<p>    find_system(r)</p>
<p>See what you get?</p>
<p>I hope this helped!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wei</title>
		<link>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-55</link>
		<dc:creator>wei</dc:creator>
		<pubDate>Tue, 11 Mar 2008 01:02:04 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/03/04/searching-in-simulink/#comment-55</guid>
		<description>Hi Seth,
1. If I use find_system('type','Block_Diagram'), it returns a string. find_system can return cell string if multiple items found or empty cell if none is found. This makes post processing inconvenient (setdiff/cellfun in post #6 can't be safely used in many cases.) Therefore, I go with find_system(0, 'type','Block_Diagram') or like which returns array, albeit it may be empty.

2. Could you explain why find_system('findall','on','type','Block_Diagram') returns handle, and find_system('findall','off','type','Block_Diagram') returns string or cell string?

3. How to best use find_system with find_mdlrefs to search entire model?

4. When will there be APIs for the find facility as in post#5 for combined Simulink and Stateflow?</description>
		<content:encoded><![CDATA[<p>Hi Seth,<br />
1. If I use find_system(&#8217;type&#8217;,'Block_Diagram&#8217;), it returns a string. find_system can return cell string if multiple items found or empty cell if none is found. This makes post processing inconvenient (setdiff/cellfun in post #6 can&#8217;t be safely used in many cases.) Therefore, I go with find_system(0, &#8216;type&#8217;,'Block_Diagram&#8217;) or like which returns array, albeit it may be empty.</p>
<p>2. Could you explain why find_system(&#8217;findall&#8217;,'on&#8217;,'type&#8217;,'Block_Diagram&#8217;) returns handle, and find_system(&#8217;findall&#8217;,'off&#8217;,'type&#8217;,'Block_Diagram&#8217;) returns string or cell string?</p>
<p>3. How to best use find_system with find_mdlrefs to search entire model?</p>
<p>4. When will there be APIs for the find facility as in post#5 for combined Simulink and Stateflow?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
