title: how to make this function periodic in MATLAB?
body: <p>I have wrote this code in MATLAB editor and want this function to be periodic (period = 0.8s)</p>
  
  <pre><code>HR=75;
  
  E_max=2.0;
  
  E_min=0.06;
  
  t_c=60/HR;
  
  T_max=0.2+0.15*t_c;
  
  t=0:0.0001:t_c;
  
  t_n=t/T_max;
  
  E_n=1.55*(((t_n/0.7).^1.9)./(1+(t_n/0.7).^1.9)).*(1./(1+(t_n/1.17).^21.9));
  
  E=(E_max-E_min)*E_n+E_min;
  
  plot(t,E)
  </code></pre>
  
  <p>I want to use the function in simulink as a voltage source. so i do not need a point but the whole function. so I need a function that takes the overall time (for example 20 secs) and gives the output CONTINUSELY (like a Sin function).</p>
  
  <p>the function and it's shape is:
  <a href="http://tinypic.com/r/2641a1s/8" rel="nofollow">http://tinypic.com/r/2641a1s/8</a></p>