title: Matlab/Simulink Data Store Memory Error: "Simulink does not have enough information to determine output sizes for this block"
body: <p>I have got a problem with matlabs simulink and i am already struggling for more than a hour on this simple task, but i do not know what is wrong.
  i have a matlab function (calc_fft) and i have a constant (targetFrequency). I do not want to write this constant in the function block. instead i want it in a "data store memory" block.</p>
  
  <p>In the picture below, you can see my setup/configuration.
  I just want one number inside this data store memory block, for example 440.</p>
  
  <p><a href="https://i.stack.imgur.com/BVhNV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BVhNV.png" alt="problem"></a></p>
  
  <p>inside the matlab function block, there is something like this</p>
  
  <pre><code>function [y,mx,amp] = fcn(u)
      global targetFrequency;
      target = targetFrequency;
  ...
  </code></pre>
  
  <p>Every time i try to run the model, the error which is visible in the picture below is shown.</p>
  
  <p><a href="https://i.stack.imgur.com/p4ANa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p4ANa.png" alt="error"></a></p>
  
  <p>what am i doing wrong? any suggestions?</p>