• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Why doesn't MATLAB have +=, -=, *= ?

eLiu

Diamond Member
Don't get me wrong... I love matlab, but does anyone know why they don't have +=, -= or *= operators?

They're so convenient! And if you have a complex indexing scheme or something, you don't have like:
A(junkjunkjunkjunk,junkjunkjunkjunk2) = A(junkjunkjunkjunk,junkjunkjunkjunk2) + 3;
instead,
A(junkjunkjunkjunk,junkjunkjunkjunk2) += 3;

Isn't that nice? C'mon mathworks, what's the deal 🙁

-Eric
 
I mean the incrementing by 3 is arbitrary. There coudl be some other expression there. The point is that in order to update a part of an array/matrix (example: working with a block-diagonal matrix with non-uniformly sized blocks), I have to type out the indexing twice. It's just a pet peeve/whine, not really any real trouble, lol.
 
Originally posted by: eLiu
I mean the incrementing by 3 is arbitrary. There coudl be some other expression there. The point is that in order to update a part of an array/matrix (example: working with a block-diagonal matrix with non-uniformly sized blocks), I have to type out the indexing twice. It's just a pet peeve/whine, not really any real trouble, lol.
Yeah, I know. I've been programming MATLAB for years and am now trying to switch over to C/C#. Trying to deal with arrays in C is like pulling teeth compared to MATLAB - they both have their strengths and weaknesses I suppose.
 
Originally posted by: ObscureCaucasian
I've used Maple... I think it's more similar to Mathematica than Matlab, but my experience with both the others is very limited.
Maple is similar to Mathematica, but its symbolic functionality is completely contained within the MATLAB symbolic manipulation toolkit (i.e. the toolkit actually calls Maple functions).
 
Back
Top