MATLAB: Ensure the syntax is what we guess


It would be nice to publish (as in Old School Languages) a syntax summary of Matlab, reflecting the exact behaviour of the interpreter.
It could help to prevent surprise from unexpected results, such as when one evaluates the expression : 5 + 1*0:10
A single transcription of the formal grammar contained in the interpreter's code would be sufficient.

Best Answer

  • You do not have to _guess_ the details of the syntax. It is explained exhaustively in the documentation already. Your example |5 + 1*0:10| is clear after reading:
    doc precedence