How can one choose the last column of a matrix?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How can one choose the last column of a matrix?
I have a matrix that might change size in every particular run and I need the program to automatically plot the last column versus some other variable.but I cant choose the U<no. of column> command since I don't know how big my matrix is gonna be this time
Solved! Go to Solution.
- Labels:
-
Physics
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Use the cols() function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Use
or if you changed ORIGIN you should use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Another approach. Overkill I know but couldn't resist. At least you know have the ability to extract rows from Matricies.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
To complete it add an additional transpose at the end.
Overkill? 🙂 Think we have a new example to explain what an euphemism is
The transpose-column extract-transpose way work pretty well, but with large matrices an in side a loop it gets terribly slow. Generally its surprising that the built in matrix routines are much slower than self written routines using for-loops - especially augment and stack. One would expect the opposite. This was discussed and timed in an older thread and really was astonishing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Werner Exinger wrote:
To complete it add an additional transpose at the end.
Overkill? 🙂 Think we have a new example to explain what an euphemism is
Sorry, was a little lazy of me.
The transpose-column extract-transpose way work pretty well, but with large matrices an in side a loop it gets terribly slow. Generally its surprising that the built in matrix routines are much slower than self written routines using for-loops - especially augment and stack. One would expect the opposite. This was discussed and timed in an older thread and really was astonishing.
I remember that thread and you are correct the results where astonishing.
Mike
