Message Boards Message Boards

Formatting units and subscripts for readable output and code

Posted 11 years ago

Like many engineers my calculations have to be readable to others that do not use Mathematica. There are standard ways of representing variables and units which make the calculations readable and give a certain familarity which helps to spot errors etc. There are two particular items that give trouble in trying to achieve this. With units I have been able to create my own abbreviated unit definitions e.g.. kN for kiloNewton and m for metres. However, UnitConvert insists on converting to its own form rather than the form I want e.g.. m N rather than kNm. Is there away to force it to give you the units you want? This used to work well in "Automatic Units" but "Automatic Units" does not seem to work with v.10.

The second problem is subscripts. I need a very large number of symbols that have subscripts. It is convenient to use the Symbolize function to produce these when needed. However, I then run into trouble when I want to use subscripts as indices of lists. Is there any way over this?

I have attached a notebook which explains what I want with a couple of trivial examples as I do not seem to be able to post nicely formatted Mathematica code in here when it contains subscripts etc.

Attachments:
POSTED BY: malcolm woodruff
Posted 10 years ago

Very large number of symbols with subscripts is my problem, too.

I tried to separate my variables inside Blocks, and use them there like "global variables", without using Symbolize. My idea was to pick up necessary calculation cells from a larger list of blocks in a notebook, and send calculation results to a report file.

I need to send definitions of inequalities, variable values, and calculation results to a report file. How do you recommend to send definitions of inequalities, including subscripts, to another file?

POSTED BY: Kari K
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract