Timeline for Issues when applying list of indices to a matrix
Current License: CC BY-SA 4.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 27, 2020 at 17:20 | history | edited | J. M.'s missing motivation♦ |
edited tags
|
|
Aug 26, 2020 at 18:56 | vote | accept | Steven Sagona | ||
Aug 26, 2020 at 18:48 | review | Close votes | |||
Sep 3, 2020 at 11:03 | |||||
Aug 26, 2020 at 18:46 | answer | added | Bob Hanlon | timeline score: 3 | |
Aug 26, 2020 at 18:44 | comment | added | Steven Sagona | @CarlWoll, it is helpful to see someone elses attempt with it. But I notice that his methods seem pretty substantially different than mine, and I wonder why a method like this (where you mapthread a list to the Part function) doesn't work.. | |
Aug 26, 2020 at 18:42 | comment | added | Steven Sagona | @yarchik, I want to extract the upper triangular part of a square matrix into a flat list. (Ideally, I would like this list to be organized such that elements are picked from the top-left first). I am particularly interested in what exactly is the issue in the logic with my attempt. | |
Aug 26, 2020 at 18:29 | comment | added | Carl Woll | Does this answer your question? Take upper triangular part of matrix | |
Aug 26, 2020 at 18:23 | comment | added | Steven Sagona | @CarlWoll, thanks but unfortunately that shuffles around the order of the elements - which is not ideal in my situation. | |
Aug 26, 2020 at 18:18 | comment | added | Carl Woll | Diagonal returns the diagonal elements. | |
Aug 26, 2020 at 18:17 | comment | added | Steven Sagona | @CarlWoll, I'm primarily interested in improving so my preference would be to learn how to do this using the basic syntax - but in the future, (when I'm confident but lazy) I would be interested in using that undocumented internal function. Do you happen to know if there's another command that grabs the diagonal elements too? | |
Aug 26, 2020 at 18:11 | comment | added | Steven Sagona | @yarchik, the upper triangle (with or without diagonals) made to be a vector. So in this case, {2, 3, 6} or {1, 2, 3, 5, 6, 9} | |
Aug 26, 2020 at 18:07 | comment | added | yarchik | What is the desired output? | |
Aug 26, 2020 at 17:43 | comment | added | Carl Woll |
You could try using an undocumented internal function: Statistics`Library`UpperTriangularMatrixToVector[f]
|
|
Aug 26, 2020 at 17:07 | history | asked | Steven Sagona | CC BY-SA 4.0 |