Questions tagged [output-formatting]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
31 views

MatrixForm a product of matrices [closed]

I was hoping that MatrixForm[SingularValueDecomposition[{{1, 2}, {3, 4}}] ] would neatly display the singular value decomposition of a matrix in the form of a ...
3
votes
2answers
94 views

Format table output

I'm trying to make a quick code to give me coordinates of some circles to be read in AUTOCAD. When I use the format "Table" or ...
0
votes
1answer
41 views

remove one of the column in the output of Solve command

I would like to remove one variable in the output of the "Solve" command without changing the rest. For instance, in the following code ...
4
votes
1answer
49 views

StringTemplate with Irrational number

How to keep irrational number as their original form rather than approximation when using StringTemplate? StringTemplate["`1`"][Sqrt[3]] This will output ...
3
votes
1answer
79 views

How to preserve multirows when exporting TableForm results?

I've created a table of data in Mathematica with a list of values with each data point. So for example, I have the following dummy data: ...
3
votes
2answers
189 views

Extract outputs from a WHILE loop in a table format

How can I convert my multiple outputs of a while loop in a table form and save it for later use. Here is a sample code: ...
3
votes
0answers
99 views

Why does Factor[] not factor -1?

Consider the two expressions -2a-2b and -a-b. The TreeForm[] looks identical However, ...
2
votes
0answers
66 views

What do indices in brackets mean? [closed]

Solving the Schrodinger equation for a free particle gives me this output: What does the $\psi^{(2,0)}$ mean here?
0
votes
1answer
25 views

Alignment when not dealing with (just) text [duplicate]

In designing interfaces for dynamic operation, I am finding that I cannot figure out how to get alignment to work. For example: ...
2
votes
1answer
116 views

Changing the format string for numeric floating point values in the Put function

In my current macro, I have: Put[Chop[someList], "someFile"]; where "someList" is a mixed bag of "strings", "integers", "exact complex values" (e.g. ...
6
votes
2answers
1k views

How to get Planck length in meters to 6 decimal places

I want Mathematica to format quantities to more decimal places than the default. For example I have tried ...
0
votes
1answer
67 views

PageWidth not inserting line breaks into long strings

I am having some trouble setting the width of my output. I have some very long expressions, and I would like to output them as strings of maximum length 80 characters. For example, I have a very long ...
2
votes
1answer
79 views

Alignment on character that has an overscript

We can align to a character: ...
0
votes
1answer
61 views

WriteLine[] not working once put into a function

I wrote a function that takes two strings, an integer, and an OutputStream, it's supposed to write to. The function is: ...
0
votes
1answer
104 views

Displaying the repeating decimal expansion of a rational number [duplicate]

How do I write a decimal expansion of a rational number $a/b$ with only periodic part, e.g., given $1/7=0.14285714285714285714 \ldots$, I want just $0.142857$, the periodic part of $1/7$, to be ...
4
votes
2answers
220 views

Align y-Axes in Overlay plot

I learned about how to plot two datasets in a single plot with two y-axes by using Overlay as has been done in one of the answers in this question. Now, my ...
3
votes
2answers
173 views

What's the difference between 56 and Integer[56]? [duplicate]

I'm trying to grasp how to Wolfram Language uses symbolic expressions for everything. The concept of doing so makes sense to me, but the language doesn't behave how I predict. I understand how ...
2
votes
1answer
82 views

How to decorate data in a matrix for reporting purposes?

I want to create a report from two matrices m1 and m2 (already created, and available) with data. The report should (roughly) look like the output of the following code: ...
17
votes
1answer
315 views

How to make version 12 print Root objects to screen normally as in earlier versions?

From clean kernel, when typing result = Reduce[2 d^2 == -((2*(1 + d) + ((4 d^3)/(1 - d)))*(d - 1)),d] Here what version 12 displays on the screen, compared to ...
1
vote
2answers
104 views

Appending functions to list

Help me please. My task is to determine the sequence of polynomials $(s,s',..,-rem(fs_{k-1},s_{k}),...,constant)$ and create an array in which I will record the value of the members of this sequence ...
5
votes
1answer
67 views

Augment Export function to support custom number formatting

It's a shame that the Export framework provides no support for custom formatting of real numbers. Is it possible to augment the framework so that a "NumberForm" ...
0
votes
2answers
122 views
1
vote
0answers
97 views

Can I store output data in the Notebook file? Specifically output from NDSolve[ ]

I am having some outputs from NDSolve of the form {{x→InterpolatingFunction[…], y→InterpolatingFunction, … }} and the ...
1
vote
1answer
51 views

Hide details of ParametricFunction

I use ParametricNDSolve to return a particular combination of the (vector) variables, at the end of the integration range. This gives a ...
2
votes
1answer
103 views

How to Print["x=",x] with Style? [closed]

How to Print a text and a value with the same Style?, for example {Bold, Blue, 22} a=4 Style["The number is ", a , Blue, 22] ...
1
vote
2answers
187 views

How can I generate this exact table?

The TableForm[] is a trig table which shows sine, cosine and tangent values for integer angles from 0 degrees to 90 degrees in steps of 3 degrees. I want to recreate the exact same table using ...
2
votes
1answer
59 views

Using StringTemplate with TableForm [closed]

I have a table given by ...
0
votes
1answer
58 views

Changing the layout of an array in output

I'm curious about the following: if I want to make a table described by the following code, ...
2
votes
3answers
803 views

How do I display multiple objects on one output line?

I am using WriteString to avoid automatic line change. But it seems like the it does not work with Style, like the following <...
0
votes
1answer
101 views

Line breaks in Print and PutAppend

This is probably a simple-minded question, but I've tried many things that haven't worked. In the output below, how does one add a line break before "points=..."? It will also need to work in ...
0
votes
1answer
271 views

How can I save values generated by a Manipulate expression to a CSV file?

I have trouble generating and saving data from a manipulation that determines parameters. Can someone please help me? Manipulate[Plot[{func,x}, {x, 0, 3}] I ...
0
votes
2answers
75 views

String with numbers output formating [closed]

Is there something similar to print("blah blah is %d", 5) in python? In order to print "blah blah is 5"?
-1
votes
2answers
89 views

Conditional formatting of table

I have a table (from this question) as follows: ...
2
votes
1answer
59 views

Problem with multi-columns using Grid

I am working on a data table, ...
0
votes
2answers
102 views

How can I arrange the factors in the order I prefer when using Collect function factor a polynomial?

I input in mathematica a*b*c*h and get the output as a b c h Now if I want to factor out 'b' and 'c' at the same time and ...
0
votes
2answers
58 views

Require an expression to be formatted as an exponential expression

How can I require Mathematica to format an expression like Exp[x] x^s as Exp[x + s Log[x]]?
4
votes
1answer
65 views

Highlight certain values based on position

How to highlight or color certain values in a list based on position.. For example x = {1,2,3,4,5,5,5,6}... I want to plot x and highlight values (Red) in a position such as {0,4,5} and others should ...
0
votes
1answer
63 views

Making a plot label containing dynamically subscripted symbols [closed]

Manipulate[ Plot.... Epilog -> {Text["Al" <> ToString[x]<>"Ga" <> ToString[1 - x] <> "As", {0.5, 2}]}], {x, 0, 1}] But I ...
2
votes
1answer
38 views

Is there an option to set fractional tick lables in linear form?

I want to set the fractional tick lables in linear form like this: And it can be done by use Row in each label, but it's boring. ...
1
vote
1answer
118 views

No dividing lines for headers in `TableForm`

I seem to get this a lot, but I still can't find a systematic answer... The latest table I'm having trouble with is ...
3
votes
1answer
114 views

How to export parameters in a text file?

I have some parameters defined in my notebook as, for example, a=1; b=2; c=3; and I want to export these parameters to a .txt file in which I have the following ...
1
vote
2answers
57 views

Locate all row and column pairs containing a value in a table

I would like to find all row and column pairs that contain 1 in a table. For example, the row and column pairs that contain 1 in the table are (a,b),(b,a),(b,c),(c,b),(c,d),(d,c),(d,e),and (e,d). <...
1
vote
3answers
322 views

How to substitute curly brackets with round brackets in a grid of list

I want to produce a table (or a grid) from my list of data, as follows: ...
3
votes
4answers
203 views

Why do I get badly formatted numerical results when I use StringForm?

The following example prints the square and cube of numbers from 0.5 to 6 ...
2
votes
1answer
82 views

How to get rid of some meshes in ListDensityPlot

I have some data that needs to be represented using the function ListDensityPlot, for example : ...
1
vote
2answers
145 views

Using the top left corner of `TableForm->TableHeadings`

In the following Table TableForm[{{1, 0}, {0, 1}}, TableHeadings -> {{"x<=0", "x>0"}, {"y<=0", "y>0"}}] I ...
-1
votes
1answer
68 views

Show tabulated equations in matrix form [closed]

How do i put last equation, eqm[x, t, k, n] into matrix form? I want every row to end with == 0 ...
1
vote
1answer
141 views

Generate a "real time" table of data from an animation

I have a basic animation of a parametric plot: ...
1
vote
1answer
79 views

Apply conditional styling to the rows of a table

This is a follow-on from a similar question here. If I already have a table of data, say ...
0
votes
1answer
100 views

Create bold headings and rows in `TableForm` if `x` is prime

In the following table ...

1
3 4
5
6 7
24