Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hey, I would like to do the following in Mathcad Prime 7.0:
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
Solved! Go to Solution.
@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
@Spedex wrote:
Hey, I would like to do the following in Mathcad Prime 7.0:
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.
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 ...
Stuart
Mathcad Express 7
Hm, for me it is still not working.
I do
Then i select everything:
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
Note that the 'index' button is '[', while the 'subscript' button is [Ctrl _ ]...
Success!
Luc
@Spedex wrote:
Hm, for me it is still not working.
I do
Then i select everything:
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!).
Stuart
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:
Note that this is zoomed in to 225%.
But if you set the cursor on it, you can see how it was created:
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...:
Which is this:
But you have to use index, NOT subscript, as subscript is limited to a single level.
Prime 4 file attached.
Success!
Luc
@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
Ok, next Problem:
I cannot definie a variable which uses this method, right?
At least i have problems with that at the moment.
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 _
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:
Yep, did it. Here's a sub a sub a defined with a value of 1:
Success!
Luc
@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.
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 ...
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
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 ?
@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.
more better
@ValeryOchkov wrote:
more better
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 😈 )