cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

SOLVED
Contributor

## 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!

1 ACCEPTED SOLUTION

Accepted Solutions

## Re: Display the index value

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

9 REPLIES 9

## Re: Display the index value

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.

## Re: Display the index value

for example to display when n=3, to plug in that value and get or display W1,W2,W3,W4,,W5 .

## Re: Display the index value

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

## Re: Display the index value

Thank you Werner!

every time i use subsitute, do i need to use explicit with it?

## Re: Display the index value

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!

## Re: Display the index value

 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.

## Re: Display the index value

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!

## Re: Display the index value

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!

## Re: Display the index value

 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).

Announcements