title: Storing variables inside function Matlab
body: <pre><code>function abc= calculate(obj)
  ag=obj.turns*d/c;
  end
  </code></pre>
  
  <p>I tried using:</p>
  
  <pre><code>temp=num2cell(obj.turns)
              s=temp{:}
  </code></pre>
  
  <p>But the value is replaced every time.</p>
  
  <p>How can I store the value of obj.turns in this function? The value changes every time the function is called.</p>