|
|
|
|
|
by galangalalgol
1384 days ago
|
|
I don't want 1d vectors to exist, and ideally, I'd want everything to be infinite rank tensors with som clean notation for singletons x N or N x singletons or NxMx singletons etc. The dimension mismatch has caught more errors for me than I could ever possibly count. My functions don't check to see if something is scalar or columnar, I let the error tell the user their mistake. And using a column vector when a row vector is expected is a math error. And the same function usually works for scalar or vector or matrix for the most part. I do like the dot notation and Julia in general, but I just don't have many complaints about Matlab. Auto expansion maybe. They do allow helper functions in the same file now, finally. |
|
As for "math error", it often is nothing to do with that, you just want a list of values, what should such a list be? Column or row? And often, I'm the user, calling into other people's code that sometimes wants columns, sometimes rows, and behaves surprisingly different for each (sometimes with errors, sometimes not.)
There should be a convention in Matlab about whether fundamentally 1d structures should be columns or rows, but there isn't. (Just for example: reductions work down columns, except when the columns are length-1, while iteration only occurs along rows...)
This is a huge, huge problem in my daily work. I can give many examples, but am on my phone now.
Let me put it like this: if I could change only one single thing about Matlab, I would introduce a proper vector.