Specify and control how Mathematica formats its output, including rich text, equations and graphics.

learn more… | top users | synonyms

2
votes
2answers
304 views

I get weird <<…>> symbols in my output — what does it mean?

After I input the following: data = Table[{3 + i + RandomReal[{-3, 7}], i + RandomReal[{-2, 5}]}, {i, 1, 20}]; model = LinearModelFit[data, x, x] I got ...
2
votes
4answers
502 views

How can I format a table to look nice?

I have this code, but i would like to see the results well formated, How can I obtain a well formatted data with aligment?, similar to this one insted what i obatin, you can see here Here is ...
2
votes
2answers
389 views

Calculate with units

If I want to calculate with units, for example using Pythagoras theorem, I would do this: c = Sqrt[(3m)^2 + (5m)^2] The result will be ...
2
votes
3answers
134 views

Wrapping a data selection in Mathematica

I was wondering what would be the most efficient way to add brackets to given elements in my data set in order to change it's form from {{a,b},{c,d}} to {{{a},b},{{c},d}}. I took a look through a few ...
2
votes
3answers
86 views

How do I save a Unicode string?

I am having a problem saving a long complicated string with Unicode characters in it. I have boiled the problem down, I think, to this minimal example: ...
2
votes
2answers
268 views

Awkward output of TeXForm

When I try to format a number that has a big exponent with TeXForm the following happens: ...
2
votes
2answers
211 views

How to output an expression as a Dot[] product

How to force Mathematica to output an expression such as $a1u1+a2u2+a3u3$ as a Dot product like this one: ...
2
votes
1answer
533 views

Equation of the plane passing through the three points [duplicate]

Possible Duplicate: How to put terms in lexicographic order? I write the equation of the plane passing through the three points $A(-1, 5, -2)$, $B(2, 4, -3)$ and $F(4, -8, 6)$, and this is ...
2
votes
3answers
84 views

String formatting

I have the following string: "174,861.00 ( 4,053.52) 206,850.48 118.29 ( 31,989.48)" Parentheses stand for negative numbers. I will like to get ...
2
votes
1answer
90 views

How to change the output format of a built-in function

Is it possible to change the output of build-in functions? I would like to change the output for IdentityMatrix[n] to "I", so I tried ...
2
votes
1answer
124 views

Representation of product with exclusions

Is there a nice way to define output formatting for my expression, a product from n = k to j with ...
2
votes
2answers
513 views

How to display a different number of significant digits in each column of TableForm output?

Say I create a table with three columns of numbers. Is there a way to control the number of significant digits displayed in each column. To make this concrete, take the following command: ...
2
votes
1answer
83 views

Add text before TraditionalForm

Using Print[], I know it is possible to print out "helping text" to better understand a solution: Print["The solution is: ", x] if x holds some value. Now, this ...
2
votes
3answers
174 views

Outputting a fraction on one line with an oblique division sign

How can I make Mathematica output a fraction as x/2 as opposed to the x on top with a horizontal bar and ...
2
votes
1answer
109 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: ...
2
votes
1answer
126 views

How to use output from previous line in Plot? [duplicate]

Suppose, I want to solve a equation and want to obtain it's first root. In this case I've used In[1]=:Solve[b^2 + b*z + 1 == 0, b][[1]] This gives ...
2
votes
4answers
139 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". ...
2
votes
1answer
99 views

Strings and Formatting

There is something about strings which doesn't seem to be totally clear for me (for the moment): When entering "a string", the output, formatted as "Output" gives this string without the quotes. But ...
2
votes
1answer
63 views

Make FactorInteger print its result with CenterDot and Superscript?

I know that if I use CenterDot @@ (Superscript @@@ FactorInteger[x]) Mathematica will pretty print the output. However, is it possible to tell Mathematica to ...
2
votes
1answer
41 views

Problem with parentheses and ScriptBaselineShifts

Style[ DisplayForm@RowBox[{"(", SubsuperscriptBox[2, 6, 7], ")"}], 18, Bold, ScriptSizeMultipliers -> 1, ScriptBaselineShifts -> {1, 3}] or for ...
2
votes
2answers
89 views

Converting from TableForm to Grid

I wonder if there is an easy way to convert from TableForm to Grid. I have an existing data format that uses the Table function that I’d like to prettify…. Let’s setup a nested table as follows: ...
2
votes
1answer
82 views

Is it possible to show Tooltips in a ListPicker menu?

Is it possible to show Tooltips in a ListPicker menu? This effect is possible using TabView, but I would much prefer using ListPicker. Below is a simplified version of my code. ...
2
votes
4answers
92 views

How do I prevent exponents from being expanded when displaying text

I have a power of 2 in a list, and I want it to show as $2^{31}$ (2 with exponent 31), not 2147483648. I've tried this: ...
2
votes
1answer
55 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 ...
2
votes
1answer
69 views

ScientificForm problem

Consider this code: ...
2
votes
1answer
118 views

How can I exhibit the evaluation of formulas in a Mathcad-like way?

How can I create a function F that works like this: x = 2 f1 = x^2 + 3 f2=x+5 F[f1] x^2 + 3 = 2^2 + 3 = 7 ...
2
votes
1answer
102 views

Derivation after substitution not working

I have a code that will output an expression in form of a functions like this ...
2
votes
1answer
127 views

What's the difference between the following two codes?

I have two codes to find the integer numbers $m$, $x$, $y$, $z$ in the system of equations. First code ...
2
votes
1answer
772 views

How can I format Mathematica expressions for $\LaTeX$ without manual intervention? [closed]

I want to show my work to my audience mathematically. My audience is not interested in Mathematica but in the math itself, so I want $\LaTeX$ output. I tried ...
2
votes
1answer
166 views

How to draw a pane with rounded corners?

Pane[ Style["text is here", Bold, FontColor -> Darker[Gray, .6], Background -> Red ], Alignment -> {Center, Center} ] How to let the pane have ...
2
votes
1answer
90 views

How to preserve the order of terms in the output

Is there a way in which mathematica can preserve the order of operations while it evaluates an expression?, for instance: In my short example ...
2
votes
2answers
100 views

Generating an editable table that can be used as input

Say I have a number $n_{max}$. I want a command to generate a table like 1 1 2 2 3 3 4 4 ... nmax nmax where the second column is editable, and this table can be ...
2
votes
1answer
65 views

Simplifying expressions involving square roots and 'i' factors

I am doing the contour integration using Mathematica. After extraction of residues, my expression contains a lot of unwanted pairs such as ...
2
votes
1answer
102 views

How to prevent Grid from breaking the line upon export

I want to create a legend for my plots (a mixture of RegionPlots and ContourPlots). The legend should show the meanins of colors as boxes with text in them and the meaning of contours as framed number ...
2
votes
1answer
191 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 ...
2
votes
1answer
132 views

Randomizing a lab

I teach a class where students do a weekly lab in Mathematica. They do it in a computer lab, and because there are many of them, and only one of me, I encourage them to help one another. ...
2
votes
1answer
283 views

Substituting Symbol font for Mathematica's custom font in exported plots and other graphics

Mathematica includes some custom fonts that allow you to use a wide range of mathematical symbols in output. For example, one can write: ...
2
votes
1answer
171 views

List of different values which have to be formatted differently

I have a large list of values which – for presentation in my LaTeX document – I need to format. For instance: I have calculated growth rates which I now would like to have formatted in the form of: ...
2
votes
1answer
118 views

why mathematica outputs “TRUE” sometimes in outputs that are conditional to mean “in all other cases”?

consider this simple Input: Probability[g <= m && m <= -g + 1, {m, g} \[Distributed] UniformDistribution[{{0, 1}, {0, gg}}]] which generates a ...
2
votes
0answers
24 views

How to simplify a polynomial and get the results in the order that I want? [duplicate]

How to simplify a polynomial in a order that I want? Assume that I have a polynomial here, for example, $a^3 b^4 c^2$, the order of symbels is the dictionary order, $a>b>c$. But what if I want ...
2
votes
0answers
53 views

How to save all variables in the workspace into a file? [duplicate]

I did some time consuming computation and obtained a lot of arrays and variables; however after restart the Mathematica Kernel, all these computational results disappeared. How can I save all these ...
2
votes
0answers
48 views

Make output with nested expressions enlarge text instead of shrinking

Is there way to make Mathematica format text in nested expressions, such as Format so that the most nested text, i.e. Is displayed in the default output text size, and all of the containing, ...
2
votes
0answers
59 views

TableHeading Lines Do Not Show Up

For a list list = {{"a", "b", "c"}, {"d", "e"}}; Table heading lines do not show up ...
2
votes
0answers
172 views

Negative power instead of fraction

Solve returns a solution in the form {{x->y/a^2 + y^2/a^7}}. Since I want to process the input (with another program) in terms of Laurent polynomials, I would ...
1
vote
4answers
153 views

Applying a for loop on Out[]

I have a number of expressions, each one is an output: Out[135], Out[136], etc. I wish to print all of these outputs in a C++ form using the function: CForm. I can apply it on each Out[] separately ...
1
vote
3answers
1k views

How to write values of function to file?

For example, say I wanted to plot Sin(x) like this: Plot[Sin[x],{x,0,2 Pi}] But instead of plotting to a graph, I want to now tabulate the values of Sin[x] to a ...
1
vote
3answers
602 views

Write a table to a file

I want to compute a multidimensional table in Mathematica and write it to an external file. Here is a simple example. I have three lists x, ...
1
vote
4answers
140 views

Add Brackets to a string list

Hello stackexchange community! I have a stringlist with a value and his error for eg: {{"12","1"},{"13","2"}} Now i want to output this as something like this ...
1
vote
2answers
114 views

How to convert this answer into $\ln$ form?

I find the integral Integrate[Sqrt[2 x - x^2] + x^3 Log[(9 - x^2)/(9 + x^2)], {x, 0, 2}] and got ...
1
vote
1answer
117 views

Style markers in strings

I'm dealing with strings in Mathematica and I would love to handle their stylling in the most cenvenient way. Without loss of generality, let's assume I want to make some parts of string ...