title: subscript indices must be either positive integers less than 2^31 or logicals
body: <p>I'm quite new to Matlab/Octave programming, but have this one issue that I can't seem to solve.</p>
  
  <p>I wrote the following which is actually a quite straight forward calculation on an option price using the Black Scholes Formula (just to give you some background). However, I do constantly get the following error msg:</p>
  
  <p>"subscript indices must be either positive integers less than 2^31 or logicals"</p>
  
  <p>One would think that this explaines it quite nicely and I know there've been questions on it before. The thing that causes troubles, however, is that I am not using any kind of subscript index in my code at all.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>function v=BS_LBO_strike_call(s,T,sigma,r,q,l,alpha)
      d1=(log(alpha*l./s) + (r-q-0.5*sigma^2)*T)/(sigma*sqrt(T));
  
      d2=(log(alpha*l./s) - (r-q+0.5*sigma^2)*T)/(sigma*sqrt(T));
  
      d3=(log(alpha*l./s) + (r-q+0.5*sigma^2)*T)/(sigma*sqrt(T));
  
      d4=(log(alpha*l./s) + (r-q-0.5*sigma^2)*T)/(sigma*sqrt(T));
  
      v = exp(-r*T)*s(0.5*sigma^2./(r-q)*(l./s).^(2*(r-q)./sigma^2).*normcdf(d1) - 0.5*sigma^2./(r-q)*alpha.^(-2*(r-q)./sigma^2).*exp((r-q).*T).*normcdf(d2) + alpha.exp*((r-q).*T).*normcdf(d3) - (l./s).*normcdf(d4));
  </code></pre>
  
  <p>So, I can't seem to figure out what doesn't work out for Octave.</p>
  
  <p>I would highly appreciate if you could maybe shed some light on this. I'm convinced there must be something minor that I overlook</p>