Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 186

A string with mathematical operators (fractions, superscripts, subscripts, etc.) and a variable number

$
0
0

I want to create a list in Mathematica where a word contains a number that changes within it. However, I want the number to appear as a superscript or subscript or in a fraction etc. How can I do this?

More specifically, I want to automate the generation of this string.

enter image description here

One first (unsuccessful and ugly) attempt was the following:

nameList = Table[(Subscript["log", a]) x, {a, 2, 5}]

Result:

{x Subscript["log", 2], x Subscript["log", 3], x Subscript["log", 4],  x Subscript["log", 5]}

Viewing all articles
Browse latest Browse all 186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>