AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Matlab diagonal matrix from vector3/16/2024 ![]() ![]() Leave it in a package for a while, and let things shake out. Given all this, my answer to question is put it in stdlib.Īnd in answer to to yeah. This summer, I heard Jeff say "whatever the question, putting it in base is not the solution". I don't have the breadth of perspective that others in this thread do. For instance, Matrix(I, n, n) is actually very confusing to some casual (and not so casual) coders. The language is complicated enough that there is an argument for the core language and stdlib to have a set of composable pieces that is minimal, yet usable. A high-quality package that people will trust. Put the various v into a matrix and use eye () to. Then just repeat with a scrambled x and y - Im sure there is some function for that. v zeros (1, length (X)) for k 1 : length (X) row Y (k) col X (k) v (k) m (row, col) end. (umm, or another verb, but that's another question) or 2) One could have a package that gives people the matlab (or python or whatever) -like things that they miss. You can do this, where m is your matrix, and v is the vector of extracted values from the x,y locations. Maybe the question is whether 1) with enough documentation, examples, culture change, etc., everyone finds copy(x) natural. Having just copy(diagonal(m)) or copy(eye(n)) (or Eye, or whatever) is obviously more orthogonal. It's too late now, but pre v1.0, I would have said that if eye goes, so does diag. ![]() I think (have no statistics) that many are upset with the disappearance of eye. It also brings up again the question of how non-coders react to this. That is potentially disruptive and breaking though. I almost kind of think that diag should always return a view, then people can call copy if they need a copy. ![]()
0 Comments
Read More
Leave a Reply. |