5
votes
1answer
162 views

Restrict Mathematica command to what is inside parentheses

I have a bunch of expressions like this one: $\frac{e^{-\frac{7 J}{2 k T}} \left(2 e^{-\frac{2 g H \mu _B}{k T}}+e^{-\frac{g H \mu _B}{k T}}-e^{\frac{g H \mu _B}{k T}}-2 e^{\frac{2 g H \mu _B}{k ...
2
votes
2answers
99 views

Use only exponents (no radicals) in output expressions

Radical symbols ($\sqrt{\,\,\,\,}$) are the devil. Is there any way to get mathematica to never use them, and instead express everything as an exponential? i.e. I want ...
2
votes
2answers
88 views

Set all output to be of specific form

I want every output expression in a notebook to use //PowerExpand and also to format numbers as scientific. Is there a way to do this without explicitly calling ...
1
vote
1answer
72 views

Typesetting help

I have a rather simple question that has me flummoxed. Let's say I have two matrices: m1 = {{a1, a2}, {b1, b2}}; m2 = {{u1, v1}, {u2, v2}}; I am looking to ...
1
vote
1answer
47 views

Grouping Nested Lists Based on Differing Values of Single Element

I've a list of lists representing k-rows of truth table having n elements each in a nested list consider ...
2
votes
1answer
93 views

Display negative exponents always as fraction

I want Mathematica to display negative exponents always as fractions. I already tried: ...
0
votes
0answers
65 views

How to hide brackets and create bars over variables

I have two problems figuring out how to format my formulas properly so that when I print out the notebook the formulas look like the ones in my textbook. So far I've got this: $\sum\limits_{i=1}^5 ...
1
vote
1answer
349 views

Solving Heat equation [closed]

I want to compute the exact solution of the heat equation but I got an error. u(x,t) (equation of transmition of heat) is the solution of this differential equation: $$du/dt - \alpha d^2u/dx^2 = 0$$ ...
5
votes
3answers
261 views

How to change the color of specified digits in a number?

I've been playing with numerical approximations for irrational numbers, and would find it convenient to be able to highlight where these approximations deviate from the known correct answers. For ...
2
votes
1answer
58 views

Extract Style Attributes from Style[]

Can you extract the Style attributes from a variable. For example: var = Style["aString", Bold, 24] You can get back "aString" by using ToString[var] but I am ...
0
votes
3answers
323 views

How to get back name of the number from Max function? [duplicate]

So I have this question, using a toy example: a={1,"this"}; b={2,"that"}; result=Max[0,a[[1]],b[[1]]] the result will be 2. However what I want to obtain is ...
1
vote
1answer
62 views

Avoid unnecessary truncation

Is there any way to change the general settings in Mathematica so that when I type e.g. 0.34*60000000 I get the output ...
2
votes
4answers
163 views

Padding and formatting within BaseForm

I find using BaseForm to be a little tricky. For example, if you use BaseForm and then do some additional operation all the numbers turn back into base 10, so you have do BaseForm as the "last step". ...
5
votes
4answers
339 views

Display a number in Mathematica 9 in periodic form

I want to display a rational number in Mathematica in periodic style. PeriodicForm isn't working anymore. It worked in Mathematica 5 and now I'm using Mathematica ...
0
votes
2answers
113 views

Put results in multiple columns for comparison

One thing I would like to do in many instances is arrange input/output in columns for comparison. I expect that I need to use Grid to do this, but have not been ...
4
votes
1answer
524 views

Why does Mathematica order polynomial forms in reverse from traditional order?

I could very well be missing something obvious, but this has always bugged me with Mathematica and I don't know why it does it or how to fix it. If I enter any polynomial, say, x^2 + x - 1 for ...
2
votes
1answer
123 views

Remove braces, {}, from around DynamicModule output?

Is there a way to remove the braces from the front end output associated with DynamicModule? For instance: ...
3
votes
2answers
180 views

Can I ask Mathematica to replace the arguments of my functions with a replacement rule?

I have an equation that I evaluate at some point (let's say $x=1$) that have terms of the form f[1,y] D[g[1,y],{y,2}] Is there an easy way to replace [1,y] by ...
1
vote
1answer
93 views

How do I type boxtimes?

How do I type boxtimes in Mathematica, for example $a\boxtimes b$? This symbol is used a lot in mathematics, but I found no corresponding part in Mathematica. In TeX form, I can type \boxtimes. Can ...
0
votes
2answers
156 views

Unwanted parentheses appearing in a notebook that is opened by a button

I am writing an interactive document and have an idea to make in-line buttons that on demand would create and bring up separate notebooks containing some explanations or a remindings. One example of ...
4
votes
1answer
68 views

SuperscriptBox question

I am trying to define an object type in Mathematica as follows ...
1
vote
1answer
97 views

Rounding only reals in an expression containing, reals, integers and symbols

I am trying to make a function that would make rounding real numbers in an expression possibly consisting of real numbers, integer numbers and symbols. An example of such an expression is below: ...
12
votes
3answers
290 views

Notebook vs. DocumentNotebook; display a Notebook inline, like a DocumentNotebook

If you evaluate a DocumentNotebook[] expression in the front-end, it nicely displays inline, inside of an output cell in the current notebook: For my purposes, ...
3
votes
2answers
162 views

Why don't these styling rules work when viewed in TableForm?

m = RandomInteger[{-5, 5}, {10, 10}]; m /. {x__, y_ /; y > 0} -> Style[{x, y}, Red] % // TableForm When m without style ...
1
vote
1answer
125 views

How to apply multiple format to a list

I have a nested list like matrix = {{1.2345664, 2.38673956, 3.567846}, {0.00034554, 124.4554654, 6.34543}, {0.0000233, 244.34454, 2}} and I want to apply ...
3
votes
1answer
270 views

How can I export specific data into different pages in .PDF format?

I have made various Grid-s and arranged them column-wise in another Grid. All Grids are ...
1
vote
1answer
222 views

Export image data precision

I'm sure there is a very easy way to control this, but I have been searching for an hour now without luck. I plot a function and export it to get a table that I can use in TikZ. ...
12
votes
5answers
2k views

Formatting a number with fixed number of significant digits

I need a formatting function (say format[x_, n_]) which outputs numbers with fixed n significant digits without unnecessary dot. ...
3
votes
1answer
271 views

Formatting data tables with Grid + Dividers vs. SplitBy --> GridBy?

A quick method to format human-readable data tables with headers, is to use Grid, eg: ...
17
votes
6answers
1k views

Annoying display truncation of numerical results

I have a lot of data to inspect. An example of a number in my program is 123.189094 This gets displayed as 123.189 ...
17
votes
1answer
205 views

hat not big enough

I like to use Mathematica text cells for creating draft technical documents. When entering equations in a text cell, the ^ (hat accent) does not dynamically adjust its size to fit. It looks good if ...