title: Fix matlab code with error
body: <p>I understand that there is an error with dimensions in line dr=(r-v*v/2)*dT . But I have little knowledge of Matlab. Help to fix it, please. The code is small and simple. Maybe someone will find time to look</p>
  
  <pre><code> function [optionPrice] = upAndOutCallOption(S,r,v,x,b,T,dT)
      t = 0;
      dr=[];
      pert=[];
      while (t &lt; T) &amp; (S &lt; b)
          t = t + dT;
          dr = (r - v.*v./2).*dT;
          pert = v.*sqrt( dT ).*randn();
          S = S.*exp(dr + pert);
      end
      if S&lt;b
          % Within barrier, so price as for a European option.
          optionPrice = exp(-r.*T).* max(0, S - x);
      else
          % Hit the barrier, so the option is withdrawn.
          optionPrice = 0;
      end
      end
  </code></pre>
  
  <p>Call from another function of this kind:
  <code>
  for k=1:amountOfOptions
  [optionPrices(k)] = upAndOutCallOption(stockPrice(k)*o,riskFreeRate(k)*o,... volatility(k)*o, strike(k)*o, barrier(k)*o, timeToExpiry(k)*o, sampleRate(k)*o);
  result(k) = mean(optionPrices(k));
  end</code></p>
  
  <p>Therefore, any difficulties.</p>