# Working with indexing?

Posted 8 days ago
240 Views
|
4 Replies
|
2 Total Likes
|
 Hello everybody, please have a look at the following: In[1]:= Subscript[\[Sigma], Subscript[K, Euler]] = 10 Out[1]= 10 In[2]:= \[Sigma] = 5 Out[2]= 5 In[3]:= Subscript[\[Sigma], Subscript[K, Euler]]/\[Sigma] Out[3]= Subscript[5, Subscript[K, Euler]]/5 As a photo too, because i think it is better visible then:Does sombody have an idea on how to stop this problem and why it occurs. For me it is kind of mandatory to use those index.Greetings Christoph
4 Replies
Sort By:
Posted 8 days ago
 As you've noticed there are odd things that can happen using subscripts (and superscripts) in calculations. The solution: Don't use subscript and superscripts in calculations.But you can have the desired effect (which was posted recently either in this forum or Mathematica.StackExchange - I can't find it at the moment) using the Format statement. Format[\[Sigma]KEuler, Subscript[\[Sigma], Subscript[K, Euler]]]; \[Sigma]KEuler = 10; \[Sigma] = 5; \[Sigma]KEuler/\[Sigma] (* 2 *) 
Posted 8 days ago
 This support article addresses the issue of variables with subscripts and superscripts: https://support.wolfram.com/43606