3

I am analyzing some MATLAB code where there is the following operator: ../. I cannot find any documentation on this operator explaining what it does. Can anyone explain it to me?

 sp(it,:) = (ww).*(1../sigt).*exp(-.5*(e(it,:).^2)./(sigt.^2))*srpfrac);

Just being pedantic.

Suever
  • 64,497
  • 14
  • 82
  • 101

1 Answers1

7

There is no ../ operator, the first . is associated with the 1 indicating a radix point and the ./ is element-wise division. This was likely written by someone who is used to Python where all numbers are considered integers unless the radix point is explicitly included. The more verbose equivalent is:

1.0 ./ sigt

In your case, the 0 has been omitted as it is optional.

To improve readability and future confusion, I would just change it to the following.

1 ./ sigt
Suever
  • 64,497
  • 14
  • 82
  • 101