<?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 for Guy and Seth on Simulink</title>
	<atom:link href="http://blogs.mathworks.com/seth/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/seth</link>
	<description>This blog is about Simulink.</description>
	<lastBuildDate>Fri, 10 Feb 2012 01:06:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Follow the Bouncing Ball by mhark sancha</title>
		<link>http://blogs.mathworks.com/seth/2008/09/18/follow-the-bouncine-ball/#comment-1712</link>
		<dc:creator>mhark sancha</dc:creator>
		<pubDate>Fri, 10 Feb 2012 01:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2008/09/18/follow-the-bouncine-ball/#comment-1712</guid>
		<description>how can i appear the two balls for one window in mathlab??</description>
		<content:encoded><![CDATA[<p>how can i appear the two balls for one window in mathlab??</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Building Models with MATLAB Code by Guy Rouleau</title>
		<link>http://blogs.mathworks.com/seth/2010/01/21/building-models-with-matlab-code/#comment-1711</link>
		<dc:creator>Guy Rouleau</dc:creator>
		<pubDate>Thu, 09 Feb 2012 18:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2010/01/21/building-models-with-matlab-code/#comment-1711</guid>
		<description>@Wintersprite: This is a good point. Currently, MathWorks does not provide such feature. However, you are not the first person asking for that. Our development team is aware of this and considering it.

Can you let us know a bit more details on your use case? Why this feature would be useful for you?</description>
		<content:encoded><![CDATA[<p>@Wintersprite: This is a good point. Currently, MathWorks does not provide such feature. However, you are not the first person asking for that. Our development team is aware of this and considering it.</p>
<p>Can you let us know a bit more details on your use case? Why this feature would be useful for you?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Building Models with MATLAB Code by Wintersprite</title>
		<link>http://blogs.mathworks.com/seth/2010/01/21/building-models-with-matlab-code/#comment-1710</link>
		<dc:creator>Wintersprite</dc:creator>
		<pubDate>Thu, 09 Feb 2012 15:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2010/01/21/building-models-with-matlab-code/#comment-1710</guid>
		<description>Gentlemen, your posts are great and touch on odd topics that are not explained so well in the documentation.  You never answered the guy last year who wondered whether there was any possibility of a &quot;model construction recording mode,&quot; like recording a macro in Excel.  You would record everything as you built the model, and then it could generate the corresponding m-script from it.  What are the prospects for this?</description>
		<content:encoded><![CDATA[<p>Gentlemen, your posts are great and touch on odd topics that are not explained so well in the documentation.  You never answered the guy last year who wondered whether there was any possibility of a &#8220;model construction recording mode,&#8221; like recording a macro in Excel.  You would record everything as you built the model, and then it could generate the corresponding m-script from it.  What are the prospects for this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Building Models with MATLAB Code by Seth</title>
		<link>http://blogs.mathworks.com/seth/2010/01/21/building-models-with-matlab-code/#comment-1709</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Wed, 08 Feb 2012 15:16:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2010/01/21/building-models-with-matlab-code/#comment-1709</guid>
		<description>@Snehal - I use the Space Bar to fit the system to view.</description>
		<content:encoded><![CDATA[<p>@Snehal &#8211; I use the Space Bar to fit the system to view.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Modeling Mechanical Systems: The Double Pendulum by Seth</title>
		<link>http://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1708</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Wed, 08 Feb 2012 15:14:49 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/02/26/modeling-mechanical-systems-the-double-pendulum/#comment-1708</guid>
		<description>@Mike - &quot;Do not work&quot; is a very general condition.  If you would like further help on this, I suggest posting to &lt;a href=&quot;http://www.mathworks.com/matlabcentral/answers/&quot; rel=&quot;nofollow&quot;&gt;MATLAB Answers&lt;/a&gt;.  Good luck.</description>
		<content:encoded><![CDATA[<p>@Mike &#8211; &#8220;Do not work&#8221; is a very general condition.  If you would like further help on this, I suggest posting to <a href="http://www.mathworks.com/matlabcentral/answers/" rel="nofollow">MATLAB Answers</a>.  Good luck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Initializing buses using a MATLAB Structure by Guy Rouleau</title>
		<link>http://blogs.mathworks.com/seth/2011/12/05/initializing-buses-using-a-matlab-structure/#comment-1707</link>
		<dc:creator>Guy Rouleau</dc:creator>
		<pubDate>Mon, 06 Feb 2012 18:11:10 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/?p=170#comment-1707</guid>
		<description>Thank you Thomas Marullo for sharing your implementation.

Our development team is working on supporting this feature as soon as possible.</description>
		<content:encoded><![CDATA[<p>Thank you Thomas Marullo for sharing your implementation.</p>
<p>Our development team is working on supporting this feature as soon as possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Initializing buses using a MATLAB Structure by Thomas Marullo</title>
		<link>http://blogs.mathworks.com/seth/2011/12/05/initializing-buses-using-a-matlab-structure/#comment-1706</link>
		<dc:creator>Thomas Marullo</dc:creator>
		<pubDate>Mon, 06 Feb 2012 15:46:20 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/?p=170#comment-1706</guid>
		<description>@Radityo,

I modified the Simulink.Bus.createObject file, specifically the createBus function with a simple set of code that correctly sets the dimension parameter:


%% tmm dimension change
if (numel(node) &gt; 1)
  el.Dimensions = [1 numel(node)];
end
%%


Full Function below:


% Create Bus object (recursive calls)
function [busName, idx]= createBus(sp, path, name, idx)
  busName=[];
  if ~isstruct(sp)
      return;
  end
  
  if ~isempty(path)
      path = [path, &#039;.&#039;];
  end
  
  busObj=Simulink.Bus;
  nodeNames = fieldnames(sp);
  for n=1:size(nodeNames,1)
    node = sp.(nodeNames{n});
    if isstruct(node)
        % Generate sub-bus
        subBusName = nodeNames{n};
        [subBusName, idx] = createBus(node, [path, nodeNames{n}], subBusName, idx); 
        el=Simulink.BusElement;
        el.Name =nodeNames{n};
        el.DataType =subBusName;
        %% tmm dimension change
        if (numel(node) &gt; 1)
            el.Dimensions = [1 numel(node)];
        end
        %%
        busObj.Elements(end+1)=el;
    elseif isnumeric(node) &#124;&#124; islogical(node)
        el=Simulink.BusElement;
        el.Name =nodeNames{n};
        [el.DataType, el.Dimensions, el.Complexity]=getValueAttr(node);
        busObj.Elements(end+1)=el;
    else
       DAStudio.error(&#039;Simulink:tools:slbusCreateObjectNonNumericStructField&#039;, ...
                       [path, nodeNames{n}]);
   end       
  end

  [busName, idx] = generateBusName(name, idx);
  assignin(&#039;base&#039;, busName, busObj);
end


This seems to work very well.  Let me know if it helps.</description>
		<content:encoded><![CDATA[<p>@Radityo,</p>
<p>I modified the Simulink.Bus.createObject file, specifically the createBus function with a simple set of code that correctly sets the dimension parameter:</p>
<p>%% tmm dimension change<br />
if (numel(node) &gt; 1)<br />
  el.Dimensions = [1 numel(node)];<br />
end<br />
%%</p>
<p>Full Function below:</p>
<p>% Create Bus object (recursive calls)<br />
function [busName, idx]= createBus(sp, path, name, idx)<br />
  busName=[];<br />
  if ~isstruct(sp)<br />
      return;<br />
  end</p>
<p>  if ~isempty(path)<br />
      path = [path, '.'];<br />
  end</p>
<p>  busObj=Simulink.Bus;<br />
  nodeNames = fieldnames(sp);<br />
  for n=1:size(nodeNames,1)<br />
    node = sp.(nodeNames{n});<br />
    if isstruct(node)<br />
        % Generate sub-bus<br />
        subBusName = nodeNames{n};<br />
        [subBusName, idx] = createBus(node, [path, nodeNames{n}], subBusName, idx);<br />
        el=Simulink.BusElement;<br />
        el.Name =nodeNames{n};<br />
        el.DataType =subBusName;<br />
        %% tmm dimension change<br />
        if (numel(node) &gt; 1)<br />
            el.Dimensions = [1 numel(node)];<br />
        end<br />
        %%<br />
        busObj.Elements(end+1)=el;<br />
    elseif isnumeric(node) || islogical(node)<br />
        el=Simulink.BusElement;<br />
        el.Name =nodeNames{n};<br />
        [el.DataType, el.Dimensions, el.Complexity]=getValueAttr(node);<br />
        busObj.Elements(end+1)=el;<br />
    else<br />
       DAStudio.error(&#8216;Simulink:tools:slbusCreateObjectNonNumericStructField&#8217;, &#8230;<br />
                       [path, nodeNames{n}]);<br />
   end<br />
  end</p>
<p>  [busName, idx] = generateBusName(name, idx);<br />
  assignin(&#8216;base&#8217;, busName, busObj);<br />
end</p>
<p>This seems to work very well.  Let me know if it helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Initializing buses using a MATLAB Structure by Radityo Pradipto</title>
		<link>http://blogs.mathworks.com/seth/2011/12/05/initializing-buses-using-a-matlab-structure/#comment-1705</link>
		<dc:creator>Radityo Pradipto</dc:creator>
		<pubDate>Sat, 04 Feb 2012 11:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/?p=170#comment-1705</guid>
		<description>Do you guys find anything new on how to use multidimensional structure using &#039;Simulink.Bus.createObject&#039; command? That would be really helpful for my team. 

My research team in University of Melbourne is currently working on how to expand the limitation multi dimensional structure above since we need it to simplify our simulation project, so I&#039;ll post something in case we manage to figure it out</description>
		<content:encoded><![CDATA[<p>Do you guys find anything new on how to use multidimensional structure using &#8216;Simulink.Bus.createObject&#8217; command? That would be really helpful for my team. </p>
<p>My research team in University of Melbourne is currently working on how to expand the limitation multi dimensional structure above since we need it to simplify our simulation project, so I&#8217;ll post something in case we manage to figure it out</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on New (Since R2009a) Simulink inside Stateflow by Michael Carone</title>
		<link>http://blogs.mathworks.com/seth/2010/02/04/new-since-r2009a-simulink-inside-sateflow/#comment-1704</link>
		<dc:creator>Michael Carone</dc:creator>
		<pubDate>Fri, 03 Feb 2012 14:33:26 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2010/02/04/new-since-r2009a-simulink-inside-sateflow/#comment-1704</guid>
		<description>@Steffen: Even though the data is stored in the Stateflow data dictionary, you also need to pass the data into the function that you are calling, whether it&#039;s a Simulink function or a MATLAB function.  For example, if you open the sf_car model, you&#039;ll see that the &quot;gear&quot; and &quot;throttle&quot; arguments are passed into the Simulink function.  And if you open the Model Explorer, you&#039;ll see that those two variables are stored within the Stateflow data dictionary.</description>
		<content:encoded><![CDATA[<p>@Steffen: Even though the data is stored in the Stateflow data dictionary, you also need to pass the data into the function that you are calling, whether it&#8217;s a Simulink function or a MATLAB function.  For example, if you open the sf_car model, you&#8217;ll see that the &#8220;gear&#8221; and &#8220;throttle&#8221; arguments are passed into the Simulink function.  And if you open the Model Explorer, you&#8217;ll see that those two variables are stored within the Stateflow data dictionary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Advanced S-function Techniques: Scheduling Future Events by Guy Rouleau</title>
		<link>http://blogs.mathworks.com/seth/2012/01/22/advanced-s-function-techniques-scheduling-future-events/#comment-1703</link>
		<dc:creator>Guy Rouleau</dc:creator>
		<pubDate>Fri, 03 Feb 2012 14:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/?p=174#comment-1703</guid>
		<description>@Han,

PWM modulation is a very good example where a variable sample time can be very useful. Instead of relying on zero-crossing to go back and forth in time to find switching events, scheduling them is more efficient.</description>
		<content:encoded><![CDATA[<p>@Han,</p>
<p>PWM modulation is a very good example where a variable sample time can be very useful. Instead of relying on zero-crossing to go back and forth in time to find switching events, scheduling them is more efficient.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

