Reputation: 21827
Is it possible in Matlab to increment a value of a variable without restating it on the right hand side of the statement?
Upvotes: 22
Views: 29585
Reputation: 27180
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.
Upvotes: 19
Reputation: 283624
MatLab doesn't have compound assignment, but the open-source clone Octave does.
Source: http://hyperpolyglot.org/numerical-analysis
Upvotes: 7