Access a element in a vector
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Access a element in a vector
Hi,
Assume I have a vector of 10*10. How to access one element from the vector in MATHCAD Prime.
Say I would like to know 3*4th element in the vector. How to get the same
Solved! Go to Solution.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MR_9547140 wrote:
Hi,
Assume I have a vector of 10*10. How to access one element from the vector in MATHCAD Prime.
Say I would like to know 3*4th element in the vector. How to get the same
You use the vector/matrix index to do so (keyboard short is "[" without the quotes), separating row and column index by a comma.
Note that by default Prime starts to number vectors and matrices starting with 0. You can change this by setting a different value for the system variable ORIGIN (either at the top of the page or via the menu).
So if you have a 10 x 10 matrix, the top left element has the indices 0,0
In Prime instead of using the matrix index you may also use the matrix like a function, providing row and column index as arguments.
Here is an example:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MR_9547140 wrote:
Hi,
Assume I have a vector of 10*10. How to access one element from the vector in MATHCAD Prime.
Say I would like to know 3*4th element in the vector. How to get the same
You use the vector/matrix index to do so (keyboard short is "[" without the quotes), separating row and column index by a comma.
Note that by default Prime starts to number vectors and matrices starting with 0. You can change this by setting a different value for the system variable ORIGIN (either at the top of the page or via the menu).
So if you have a 10 x 10 matrix, the top left element has the indices 0,0
In Prime instead of using the matrix index you may also use the matrix like a function, providing row and column index as arguments.
Here is an example:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
From "Help Center" - "About Working With Arrays": https://support.ptc.com/help/mathcad/r8.0/en/#page/PTC_Mathcad_Help/about_working_with_arrays.html#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
We can do it so too
Who can show an even more exotic way to access one element from the matrix?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Matrix Exercises
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How crazy can it get?
Luc
