3 ms·
The real killer about Matlab is its one-based indexing. Makes arithmetic index operations look ugly (and unintuitive) as hell.
by wallacoloo 11y ago
The real killer about Matlab is its one-based indexing. Makes arithmetic index operations look ugly (and unintuitive) as hell.
- TTPrograms 11y agoIt's one-based indexing combined with length being defined as the number of entries, IIRC. There was a blog post on here a few months ago that explained how you need one or the other to minimize the need for off-by-one corrections, though I can't find it now. I'd consider switching to numpy (ignoring organizational issues) if it didn't take 10 times as many characters to describe all the operations. If you're spending you're day doing algorithm development having least squares and every linear algebra operation you can think of as first class citizens is a huge plus for readability and code cleanliness.