<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Where Does That Variable Come From?</title>
	<atom:link href="http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/</link>
	<description>This blog is about Simulink.</description>
	<lastBuildDate>Mon, 13 Feb 2012 09:45:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Amy</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1208</link>
		<dc:creator>Amy</dc:creator>
		<pubDate>Fri, 03 Sep 2010 22:04:14 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1208</guid>
		<description>@Guy,

Thanks for the tip. I suspected that was the best option, but I&#039;m not as familiar with the way Simulink works and wanted to be sure I was doing the calculations optimally. 

Best,

Amy</description>
		<content:encoded><![CDATA[<p>@Guy,</p>
<p>Thanks for the tip. I suspected that was the best option, but I&#8217;m not as familiar with the way Simulink works and wanted to be sure I was doing the calculations optimally. </p>
<p>Best,</p>
<p>Amy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: liang</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1206</link>
		<dc:creator>liang</dc:creator>
		<pubDate>Thu, 02 Sep 2010 06:04:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1206</guid>
		<description>UNABLE TO EVALUATE WORKSPACE PARAMETER</description>
		<content:encoded><![CDATA[<p>UNABLE TO EVALUATE WORKSPACE PARAMETER</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1204</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Wed, 01 Sep 2010 19:23:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1204</guid>
		<description>@Amy,

It is feasible to set the gain of a Gain block based on the value of another signal. However I do not recommend doing that. Typically in Simulink you have to types of data:

- Signals: Intended to change every time step
- Parameters: Intended to change not frequently

Trying to set a parameter every time step is using it as a signal. Parameters are not designed to change every time step and doing that can sometimes lead to unexpected behavior.

The recommended approach is, as you mention, to implement your algorithm with signals for values changing every time step. For your example, it means using a Product block instead of a Gain block.

I hope this helps.

Guy</description>
		<content:encoded><![CDATA[<p>@Amy,</p>
<p>It is feasible to set the gain of a Gain block based on the value of another signal. However I do not recommend doing that. Typically in Simulink you have to types of data:</p>
<p>- Signals: Intended to change every time step<br />
- Parameters: Intended to change not frequently</p>
<p>Trying to set a parameter every time step is using it as a signal. Parameters are not designed to change every time step and doing that can sometimes lead to unexpected behavior.</p>
<p>The recommended approach is, as you mention, to implement your algorithm with signals for values changing every time step. For your example, it means using a Product block instead of a Gain block.</p>
<p>I hope this helps.</p>
<p>Guy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amy</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1203</link>
		<dc:creator>Amy</dc:creator>
		<pubDate>Wed, 01 Sep 2010 18:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1203</guid>
		<description>I have a tangentially related question. Is there a way to set the gain to a variable that is defined by inputs to the model? I&#039;m running a simulation that receives streamed data from a separate computer during execution, and I&#039;d like to stream the gain settings in real-time. I know I can just define my own gain block that does this calculation manually, but I was just curious if there was a way to use the built-in gain block. Thanks!</description>
		<content:encoded><![CDATA[<p>I have a tangentially related question. Is there a way to set the gain to a variable that is defined by inputs to the model? I&#8217;m running a simulation that receives streamed data from a separate computer during execution, and I&#8217;d like to stream the gain settings in real-time. I know I can just define my own gain block that does this calculation manually, but I was just curious if there was a way to use the built-in gain block. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josy</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1072</link>
		<dc:creator>josy</dc:creator>
		<pubDate>Wed, 28 Apr 2010 06:33:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1072</guid>
		<description>how can please answer me how to place empty subsystem in my model.
josy_cp@yahoo.com</description>
		<content:encoded><![CDATA[<p>how can please answer me how to place empty subsystem in my model.<br />
<a href="mailto:josy_cp@yahoo.com">josy_cp@yahoo.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josy</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1071</link>
		<dc:creator>josy</dc:creator>
		<pubDate>Wed, 28 Apr 2010 06:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1071</guid>
		<description>how can i place empty subsystem in my model</description>
		<content:encoded><![CDATA[<p>how can i place empty subsystem in my model</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vipul</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1057</link>
		<dc:creator>Vipul</dc:creator>
		<pubDate>Thu, 15 Apr 2010 21:37:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1057</guid>
		<description>Hi Guy,

I appreciate your response. I can not use 2nd suggestion of using &quot;Clock&quot; or &quot;Digital Clock&quot; block because the time in my data comes from data acquisition system. Actually this is a PWM type signal and I am trying to determine the time between two successive signal rises. If I used your first suggestion, the problem arises when I try to find rising or falling edge of the signal. A topic on simulink ‘From Workspace’ block with example would be worth discussing here.

Thanks,
Vipul</description>
		<content:encoded><![CDATA[<p>Hi Guy,</p>
<p>I appreciate your response. I can not use 2nd suggestion of using &#8220;Clock&#8221; or &#8220;Digital Clock&#8221; block because the time in my data comes from data acquisition system. Actually this is a PWM type signal and I am trying to determine the time between two successive signal rises. If I used your first suggestion, the problem arises when I try to find rising or falling edge of the signal. A topic on simulink ‘From Workspace’ block with example would be worth discussing here.</p>
<p>Thanks,<br />
Vipul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1050</link>
		<dc:creator>Guy</dc:creator>
		<pubDate>Thu, 08 Apr 2010 12:40:03 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1050</guid>
		<description>Hi Vipul,

As the doc says for the From Workspace block, the first column is the time stamp at which the data of the other columns is outputted.

One quick solution if you want the From Workspace block to output also a time signal is to create a 3 columns matrix where you will have [t t u]. However this might not be the best solution.

Another way to think about it is that if you want time as a signal in your simulation you should use the &quot;Clock&quot; or &quot;Digital Clock&quot; block from the Sources section of the Simulink library.

I hope this helps.

Guy</description>
		<content:encoded><![CDATA[<p>Hi Vipul,</p>
<p>As the doc says for the From Workspace block, the first column is the time stamp at which the data of the other columns is outputted.</p>
<p>One quick solution if you want the From Workspace block to output also a time signal is to create a 3 columns matrix where you will have [t t u]. However this might not be the best solution.</p>
<p>Another way to think about it is that if you want time as a signal in your simulation you should use the &#8220;Clock&#8221; or &#8220;Digital Clock&#8221; block from the Sources section of the Simulink library.</p>
<p>I hope this helps.</p>
<p>Guy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vipul</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1049</link>
		<dc:creator>Vipul</dc:creator>
		<pubDate>Wed, 07 Apr 2010 22:35:56 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1049</guid>
		<description>Hi Seth,
I have a two column (time and signal value) array in my base workspace. I am trying to read this array  with &#039;From Workspace&#039; block in my model. I can read it but it gives me only one of the column value (signal value) from array. I would like to use the value from first column (time) based on certain conditions. Unfortunately, with this block I can not read time value (first column). Is there any specific way to do that? Am I using wrong block?
Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Seth,<br />
I have a two column (time and signal value) array in my base workspace. I am trying to read this array  with &#8216;From Workspace&#8217; block in my model. I can read it but it gives me only one of the column value (signal value) from array. I would like to use the value from first column (time) based on certain conditions. Unfortunately, with this block I can not read time value (first column). Is there any specific way to do that? Am I using wrong block?<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1028</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Thu, 25 Mar 2010 13:25:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/15/where-does-that-variable-come-from/#comment-1028</guid>
		<description>I know that the value is passed without code but if I want to retrieve my parameter value to make data range check validity, how can I do it ?

Thanks for your answer</description>
		<content:encoded><![CDATA[<p>I know that the value is passed without code but if I want to retrieve my parameter value to make data range check validity, how can I do it ?</p>
<p>Thanks for your answer</p>
]]></content:encoded>
	</item>
</channel>
</rss>

