Display the index value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Display the index value
Hello,
In the attached sheet, please scroll down to the red arrow. is there a way you can display the index value for "W". Thanks!
Solved! Go to Solution.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Maybe using "explicit" does what you want. n must not defined a value to make it work.
You can also make it look like this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
What do you mean by "the index for each W based on the n value?" The index is either n-2, n-1, n, n+1, or n+2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
for example to display when n=3, to plug in that value and get or display W1,W2,W3,W4,,W5 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Maybe using "explicit" does what you want. n must not defined a value to make it work.
You can also make it look like this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Werner!
every time i use subsitute, do i need to use explicit with it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Werner,
why doesn't it work if i define a value for as i did earlier, and then use explicit, n w/o subsitute? just trying to understand how things work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
why doesn't it work if i define a value for as i did earlier, and then use explicit, n w/o subsitute?
Mathcad's explicit command has its quirks and acts a bit strange when it comes to matrix indices.
When you defie n in your worksheet, a simple explicit,n without any substitution should do the job like in the first example below, nut as you can see yoz get a strange result when used for a vector index which is calculated (n+1).
It works OK, if you substitute the very same value you also have defined in your worksheet. But if you mistakenly substitute a different value you run into troubles. Index n gets the value you substitute, but calculated indices like n+1 use the worksheet variable.
One way to cope with this is to use the (silly looking) substitution n=n.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Couldn't add a pic anymore to the above post:
Just found out that it works OK even without substitute as long as explicit is not the only command in the symbolic evaluation - crazy!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
i like your suggestion to set n=n. this way i dont to go to each term in the equation and define n. so i can define n on the outside. Thanks Werner!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
sameer fares wrote:
i like your suggestion to set n=n. this way i dont to go to each term in the equation and define n. so i can define n on the outside. Thanks Werner!
You may also add anything else to the symbolic eval. It doesn't matter what command as long as explicit is not the only one (see above).
