What is the equivalent to += in Matlab?

前端 未结 2 977
傲寒
傲寒 2020-12-03 20:41

Is it possible in Matlab to increment a value of a variable without restating it on the right hand side of the statement?

相关标签:
2条回答
  • 2020-12-03 21:21

    MatLab doesn't have compound assignment, but the open-source clone Octave does.

    Source: http://hyperpolyglot.org/numerical-analysis

    0 讨论(0)
  • 2020-12-03 21:31

    AFAIK, there's no such thing in MATLAB.

    And this is understandable(look at Steven Lord's answer, post 11).

    That post indicates that since MATLAB is array based, such operator would be ambiguous and unintuitive, at best.

    0 讨论(0)
提交回复
热议问题