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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Index in Index in Mathcad Prime 7.0

Spedex
10-Marble

Index in Index in Mathcad Prime 7.0

Hey, I would like to do the following in Mathcad Prime 7.0:

Screenshot 2021-11-22 153049.jpg

So an index in an index. 

At the moment, whenever i press the index button in an index it sets me back up to normal but doesn't do another index.
Is there a way to do it?

Greetings

1 ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald II
(To:Spedex)


@Spedex wrote:

Hey, I did not understand a 100% percent how you did that?
How did you get the grey thing here ?


I first typed in a <ctrl -> a in the worksheet, then copied it and pasted it into the Find dialog box (ctrl-f takes you there, or just click in the box at the bottom of the Mathcad screen).   Pasting it results in the text (@ID a (@SUB a)) appearing in the Find box.  This text is Mathcad's internal code representation of aa

 

I then used Windows' built-in application Character Map to find superscript a (a)and subscript a (a). (*), copied them and pasted a before the main a in the Find box and a after the subscripted a to give (@ID aa (@SUB aa)).  Finally, I copied the new expression into a Math placeholder in the worksheet, and Mathcad converted it to aaaa.

 

A bit convoluted but it does the job.

 

Stuart

 

(*) I recommend setting Character Map to Cambria Math font first, as this font seems to display the largest number of characters in Character Map.  Many fonts will display a character in Mathcad Math or Text regions but not in Character Map ... don't ask me why or why not.

As I said, though, you can't do it for every letter as not all of them have either/both a sub- or superscripted Unicode variant.

 

Stuart

View solution in original post

17 REPLIES 17
StuartBruff
23-Emerald II
(To:Spedex)


@Spedex wrote:

Hey, I would like to do the following in Mathcad Prime 7.0:

Screenshot 2021-11-22 153049.jpg

So an index in an index. 

At the moment, whenever i press the index button in an index it sets me back up to normal but doesn't do another index.
Is there a way to do it?


 

You have to select the whole expression that you want to subindex.

 

2021 11 22 A.png

 

The direct approach would be interpreted as trying to take the index of 2 ... which isn't an array.

 

Although you can make it look like a subindex is happening ...

 

2021 11 22 B.png

 

Stuart

 

Mathcad Express 7

Hm, for me it is still not working.

I do 

Spedex_0-1637593077062.png

Then i select everything:

Spedex_2-1637593187740.png

 

and then press on the index button, but nothing is happending. And when i start writing now the term before will just be erased.

 

Am i doing something wrong?

 

Greetings

LucMeekes
23-Emerald III
(To:Spedex)

Note that the 'index' button is '[', while the 'subscript' button is [Ctrl _ ]...

 

Success!
Luc

StuartBruff
23-Emerald II
(To:Spedex)


@Spedex wrote:

Hm, for me it is still not working.

I do 

Spedex_0-1637593077062.png

Then i select everything:

Spedex_2-1637593187740.png

 

and then press on the index button, but nothing is happending. And when i start writing now the term before will just be erased.

 

Am i doing something wrong?

 

Greetings


 

What version of Mathcad are you using.   I didn't have a problem in Mathcad Express 7 for both defined and undefined variables (even indexing a number!).

 

2021 11 22 C.png

 

Stuart

 

 

LucMeekes
23-Emerald III
(To:Spedex)

I suppose you mean subscript (You should NOT confuse that with index).

Not normally, but you can make something that will look like what you want at first glance:

LucMeekes_0-1637593162538.png

Note that this is zoomed in to 225%.

But if you set the cursor on it, you can see how it was created:

LucMeekes_1-1637593265611.png

It's an a with a literal subscript a, that has an index a with a literal subscript a, that has an index a with a literal subscript a, that has an index a with a literal subscript a, that has ....

Whether you can use this or not depends on the structure of data that you want your identifier to relate to.

And of course you can create an index to an indexed variable to an indexed variable to an indexed variable to...:

LucMeekes_0-1637594539059.png

Which is this:

LucMeekes_1-1637594588203.png

But you have to use index, NOT subscript, as subscript is limited to a single level.

Prime 4 file attached.

 

Success!
Luc

StuartBruff
23-Emerald II
(To:LucMeekes)


@LucMeekes wrote:

I suppose you mean subscript (You should NOT confuse that with index).

Ah, of course.  Which explains Spedex's comment "sets me back up to normal but doesn't do another index.".

 

ctrl & - toggles the name subscript.

 

Stuart

Thank you very much @all for the help 😄

Greetings

Spedex
10-Marble
(To:Spedex)

Ok, next Problem:
I cannot definie a variable which uses this method, right?

At least i have problems with that at the moment.

LucMeekes
23-Emerald III
(To:Spedex)

If you use index you create at least two variables. The array (vector or matrix being indexed) and the index. That's why I made my comment regarding 'structure' of data...

 

In practice, if you have a need for multiple subscripts in a single variable, Prime is not your friend. You can use a single subscript and will need to separate the subsequent subscripts by separating them with markers, such as . or _

LucMeekes_0-1637596953802.png

Also note that you cannot make superscripts, other than by using characters that are defined as superscript characters, this limits you to 0...9 and a few more. Ah, maybe you can use subscript characters to get another level of subscript:

LucMeekes_1-1637597259870.png

Yep, did it. Here's a sub a sub a defined with a value of 1:

LucMeekes_2-1637597430379.png

Success!

Luc

StuartBruff
23-Emerald II
(To:Spedex)


@Spedex wrote:

Ok, next Problem:
I cannot definie a variable which uses this method, right?

At least i have problems with that at the moment.


You are correct, you cannot define a variable name with subscripted subscripts ...

 

... Well, not always, but you kind of can if you pick the right characters.

 

StuartBruff_0-1637597533893.png

 

Here I've copied the subscripted variable name aa into the Find dialog box to give the 'ID ..SUB' XML  definition.  I then copied and pasted superscript-a before the first a and subscript-a after the second a (inside the SUB term.

 

One could take the idea bit further ...

 

2021 11 22 E.png

 

Not all Latin letters have subscripted and superscripted versions, the Unicode rationale being that any application with an ounce of self-respect will provide a facility for sub- and superscripts.   

 

Stuart

 

Wikipedia

 

The World Wide Web Consortium and the Unicode Consortium have made recommendations on the choice between using markup and using superscript and subscript characters:

When used in mathematical context (MathML) it is recommended to consistently use style markup for superscripts and subscripts.... However, when super and sub-scripts are to reflect semantic distinctions, it is easier to work with these meanings encoded in text rather than markup, for example, in phonetic or phonemic transcription.[2]

Hey, I did not understand a 100% percent how you did that?
How did you get the grey thing here ?

StuartBruff
23-Emerald II
(To:Spedex)


@Spedex wrote:

Hey, I did not understand a 100% percent how you did that?
How did you get the grey thing here ?


I first typed in a <ctrl -> a in the worksheet, then copied it and pasted it into the Find dialog box (ctrl-f takes you there, or just click in the box at the bottom of the Mathcad screen).   Pasting it results in the text (@ID a (@SUB a)) appearing in the Find box.  This text is Mathcad's internal code representation of aa

 

I then used Windows' built-in application Character Map to find superscript a (a)and subscript a (a). (*), copied them and pasted a before the main a in the Find box and a after the subscripted a to give (@ID aa (@SUB aa)).  Finally, I copied the new expression into a Math placeholder in the worksheet, and Mathcad converted it to aaaa.

 

A bit convoluted but it does the job.

 

Stuart

 

(*) I recommend setting Character Map to Cambria Math font first, as this font seems to display the largest number of characters in Character Map.  Many fonts will display a character in Mathcad Math or Text regions but not in Character Map ... don't ask me why or why not.

As I said, though, you can't do it for every letter as not all of them have either/both a sub- or superscripted Unicode variant.

 

Stuart

Ok, thank you very much.


StuartBruff
23-Emerald II
(To:Spedex)


@Spedex wrote:

Ok, thank you very much.


No problem. 

Aaaaa.png

more better

AaaaaaMunk.png


@ValeryOchkov wrote:

more better

AaaaaaMunk.png


I've heard of a descent into madness before, but never a subscript into insanity!

 

Stuart

 

(maybe I'll change my avatar for your slightly amended version ... but in Fraktur font dipped in the blood of my people's ancient enemies  😈

Top Tags