title: Stateflow access array elements in matlab action language
body: <p>I'm using Stateflow (Matlab R2016b) with a vector output signal.
  The usage of matlab action language is hard to understand.</p>
  
  <ol>
  <li><strong>Set a value for whole array</strong></li>
  </ol>
  
  <p>Within matlab I use:</p>
  
  <pre><code>&gt;&gt; x = ones(1,3)
  x =
       1     1     1
  &gt;&gt; x(:) = 2
  x =
       2     2     2
  </code></pre>
  
  <p>to set all values to a specific value.
  But within stateflow i get following error</p>
  
  <pre><code>Inferred size ('scalar') for data 'x' does not match specified size ('[1 3]').
  </code></pre>
  
  <p>So, i have to use in stateflow </p>
  
  <pre><code>x = 2*ones(1,3)
  </code></pre>
  
  <p>Is there any other way of easy access to all elements?</p>
  
  <ol start="2">
  <li><strong>Change dynamically some of the values</strong></li>
  </ol>
  
  <p>Within matlab I can run</p>
  
  <pre><code>x(myStartIndex:end) = 5
  </code></pre>
  
  <p>But within stateflow, that gives me the error</p>
  
  <pre><code>Could not determine the size of this expression.
  </code></pre>
  
  <p>I don't think that building for-loops within statelow is a proper coding style.</p>
  
  <p>Thanks in advance.</p>