<?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: The If-Else Construct in Models</title>
	<link>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/</link>
	<description>This blog is about Simulink.</description>
	<pubDate>Mon, 23 Nov 2009 00:12:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Seth</title>
		<link>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-846</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Fri, 11 Sep 2009 14:55:05 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-846</guid>
		<description>@HansUS - Notice that both sides of the IF statement reference the same temporary variable, in this case named rtb_in2.  I think you are suggesting that it would be more efficient to directly write to the out variable, and you are correct.  The reason this model doesn't do that is because I disabled the expression folding optimization.  The model is so simple that with expression folding turned on, both codes were the same.  Please see important note 1 above.  Thanks for the comment.</description>
		<content:encoded><![CDATA[<p>@HansUS - Notice that both sides of the IF statement reference the same temporary variable, in this case named rtb_in2.  I think you are suggesting that it would be more efficient to directly write to the out variable, and you are correct.  The reason this model doesn&#8217;t do that is because I disabled the expression folding optimization.  The model is so simple that with expression folding turned on, both codes were the same.  Please see important note 1 above.  Thanks for the comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HansUS</title>
		<link>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-845</link>
		<dc:creator>HansUS</dc:creator>
		<pubDate>Fri, 11 Sep 2009 13:11:13 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-845</guid>
		<description>I wonder if the pseudo code on the right is correct.
Copy and paste mistake?

Without the Signal storage reuse option set,
the if-branch should use rtb_in1 instead of rtb_in2.

With activated Signal storage reuse option,
both if- and else-branch should directly write to the out variable.</description>
		<content:encoded><![CDATA[<p>I wonder if the pseudo code on the right is correct.<br />
Copy and paste mistake?</p>
<p>Without the Signal storage reuse option set,<br />
the if-branch should use rtb_in1 instead of rtb_in2.</p>
<p>With activated Signal storage reuse option,<br />
both if- and else-branch should directly write to the out variable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramin</title>
		<link>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-823</link>
		<dc:creator>Ramin</dc:creator>
		<pubDate>Wed, 12 Aug 2009 18:27:00 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-823</guid>
		<description>Can this be used to pass in a large structure, then after the first pass, not have the large structure as input?
Like a Data File which gets passed in once, and then not looked passed in after that? 

Does this just impact the generated code, or does the Matlab/Simulink Internals fetch the data anyways before the assignments in the code? I'd like to have a selector "first_time_called" then not have the input get copied since it won't change after the first call in generated code or simulink engine. (Note: values in the file are not known until run time so it can't be hard coded)</description>
		<content:encoded><![CDATA[<p>Can this be used to pass in a large structure, then after the first pass, not have the large structure as input?<br />
Like a Data File which gets passed in once, and then not looked passed in after that? </p>
<p>Does this just impact the generated code, or does the Matlab/Simulink Internals fetch the data anyways before the assignments in the code? I&#8217;d like to have a selector &#8220;first_time_called&#8221; then not have the input get copied since it won&#8217;t change after the first call in generated code or simulink engine. (Note: values in the file are not known until run time so it can&#8217;t be hard coded)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-811</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Tue, 21 Jul 2009 17:22:46 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-811</guid>
		<description>@Anand Rangaramu - I hope you can turn on this optimization, but I think you should also strive to add explicit specifications of conditional behavior to your model.  Stay tuned for a post on that.</description>
		<content:encoded><![CDATA[<p>@Anand Rangaramu - I hope you can turn on this optimization, but I think you should also strive to add explicit specifications of conditional behavior to your model.  Stay tuned for a post on that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anand Rangaramu</title>
		<link>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-773</link>
		<dc:creator>Anand Rangaramu</dc:creator>
		<pubDate>Fri, 12 Jun 2009 16:56:02 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2009/06/02/the-if-else-construct-in-models/#comment-773</guid>
		<description>This is great. We need to implement this in our code.</description>
		<content:encoded><![CDATA[<p>This is great. We need to implement this in our code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
