Questions tagged [output-formatting]
Specify and control how Mathematica formats its output, including rich text, equations and graphics.
1,440
questions
1
vote
0
answers
75
views
With both 14.0 and 14.1 Save as PDF (print preview) has become completely mangled
For over a decade, I have been using the same method of creating and saving notebooks as PDF. For some reason saving to PDF started to produce complete gibberish for most of the styles I use. It ...
1
vote
1
answer
56
views
Applying a condition to a column in a table using If
Let's assume we have the code below (The below code is derived from answer @DanielHuber link and answer @Domen link)
...
4
votes
1
answer
114
views
Converting laborious Mathematica expressions into Python source code automatically
I have worked out a (regrettably rather laborious and seemingly irreducible) expression in Mathematica. I'd like to use this expression in a ...
0
votes
1
answer
38
views
Add a new column based on the complement of column data in a table
I have this code to replace the data of each row in a specific function and display a new column showing the values of the function
...
0
votes
1
answer
31
views
How do I display my output as a complex number with decimals for the real and imaginary components? [closed]
This is my code:
c=Integrate[t/(E^t-1),{t,-Pi,Pi}]/(2Pi) a[j_]:=Integrate[t*Cos[j*t]/(E^t-1),{t,-Pi,Pi}]...
0
votes
2
answers
64
views
How to form a discrete function using table data
I have table with three column given as $a$, $\alpha_\min$ and $\chi^2$ value respectively. Now a need a function such that we define a function $\alpha_\min$[a_ ], which will order the data table ...
-1
votes
2
answers
109
views
Combinations of two table
I would like to find all the possible combinations between TSet1 and TSet2 to create a table of 18 rows.
...
3
votes
2
answers
66
views
Using PutAppend to create data file for 2D plot
I need to append 2 real numbers x,y (a point coordinates) to the bottom of a file, so that these numbers form 2 columns, the x column and the y column. I need to plot the points later. Doing this:
<...
0
votes
0
answers
43
views
How to export the given data to be imported by python? [duplicate]
Consider the following data:
...
2
votes
1
answer
44
views
Using NumberForm in TableForm
new to Mathematica, but managed to use NumberForm and TableForm, but not at the same time. When I add NumberForm the data is no longer presented in a table.
Any suggestions what I should do instead?
<...
0
votes
2
answers
88
views
How to suppress Sign[...] in output
I get the following expression in an output:
Sign[a^2 - 2]
How to suppress or avoid it from the input? I tried 'Assumptions', ComplexExapnd, etc. But it does not ...
2
votes
2
answers
66
views
Identifying the order of the output [closed]
How to identify which eigenvalue corresponds to which diagonal entry of the matrix.
Here is an example:
...
6
votes
4
answers
747
views
Is it possible for Mathematica to output the name of a matrix as opposed to its matrix form?
I am interested in working with the names of matrices as opposed to the actual matrices themselves. I would like Mathematica to recognise the content of a matrix and output its name rather than its ...
0
votes
1
answer
46
views
How can I input data of list as a number in option declare function of \begin{tikzpicture}?
I have a list
list = {{2, 2, 2}, {8/3, 9/2, 7/2}};
I want to input elements of list into
...
3
votes
2
answers
302
views
How can I get exactly solutions of this trigonometric equation?
I am trying to solve this solution
Sin[2 x + Pi/12] == Cos[3 x - Pi/5], -2 Pi <= x <= Pi
I tried
...
1
vote
0
answers
42
views
Format the output of an association such that each key-value pair has its own line, and a few other conditions
I want to format the output of an association such that each key-value pair gets has its own line, and the keys are aligned together on the left, and the values are aligned together on the right. ...
0
votes
1
answer
53
views
How can I keep form of scalar product of two vectors?
Let
a = {-6, 1, -12};
b = {x - 2, y - 1, z - 5}
be two vectors. I want to keep form of scalar product of a and ...
2
votes
0
answers
124
views
Expression -(a*b) and other superfluous parentheses in OutputForm
Mathematica sometimes places parentheses where technically none are needed, especially siding an unary minus sign. Some I would condone: a^(-b). Some look silly: <...
0
votes
0
answers
36
views
How to prevent factorization of polynomials in output
The output of my program is a matrix with polynomial entries. Most often Mathematica rearranges the polynomials with some partial or full factorization, as in $p^2q+q^2(p+q)$ or $p(p+q)$. I would like ...
2
votes
2
answers
92
views
How can I convert `Sin[2 x]` to `\sin 2x` and put result of Mathematica in a list in LaTeX like this?
I tried
ReplaceAll[
Table[{Sin[2 x] == Sqrt[i]/2,
Expand[Reduce[Sin[2 x] == Sqrt[i]/2, x, Reals]]}, {i, 0, 4}],
C[1] -> k]
and got
I copy the result ...
1
vote
1
answer
91
views
How to determine the n th number of Pi?
I use
N[Pi, 10^3]
3.14159265358979323846264338327950288419716939937510582097494459230781
6406286208998628034825342117067982148086513282306647093844609550582231
...
3
votes
1
answer
97
views
Defining an output format that doesn't break Ctrl+Shift+I
I'm used to pressing Ctrl+Shift+I (or N if I want a shorter form) to reformat my input cells in a nicer way after editing them, e.g., to remove unnecessary parentheses, add or remove spaces as needed, ...
1
vote
1
answer
82
views
How to replace C[1] in solutions of trigonometric equations into k?
This is my code
Table[{HoldForm[Cos[3 x + 2 Pi/5]] == Sqrt[i]/2,
Reduce[Sin[2 x] == Sqrt[i]/2, x, Reals]}, {i, 0, 4}]
How can I replace C1 to ...
2
votes
1
answer
110
views
Outer function for nested list
I have the following routine where I build a pair of function name lists {Flist, Klist} and 1D argument list {a1,a2,a3,a4,a5}:
<...
5
votes
2
answers
139
views
Syntax error when running file created with Save which contains backslashes
I am doing a nested integration. So far the result was successfully saved with Save["filename.wl", IntOutput] and looked as following:
...
0
votes
1
answer
53
views
Appending Tabs to an existing TabView output
I would like to do a kind of versioned TabView for several runs of the same code.
I would like some help in fixing this prototype code:
...
0
votes
0
answers
37
views
Plotting a different data set
I am trying to plot the following list in which for each value of x point, we have three different values for the y point
list={{1,{1,2,3}},{2,{2,3,4}},{3,{5,6,7}};
...
2
votes
1
answer
81
views
Generate variables in multiple integral
I want to do a multiple integrate with n variables. When I change the value of n, I do not want to rewrite the variables in the integral manually like here:
...
0
votes
1
answer
41
views
Order of the output with simplification
How can I force mathematica to write the output of the following expression in the correct order? Also, how is to multiply the constant pre-factor by the terms inside the bracket?
Input
...
1
vote
0
answers
30
views
Changing mouse over grid behavior
How to achieve that mouse over Grid is always an arrow like we see on first image (when mouse is over an item of the grid) and never the the shape we see in the ...
1
vote
0
answers
30
views
Can we find (and understand) the ordering functions used in the various output forms?
Can we use (and perhaps even understand) the sorting functions used in the various output forms (such as OutputForm, TraditionalForm, TeXForm, etc...).
This is motivated by the fact that I would like ...
0
votes
0
answers
47
views
How can I get correct dashed line of this Intersection?
This is my code
...
1
vote
0
answers
44
views
How to get a single line title in a Manipulate box? [closed]
I'm having a text output issue with the following code:
...
0
votes
1
answer
64
views
How can I find minimum of the expression $y - 5 x$ knowing that $y \log _{3}(3 x+y+9)=\left(x^{2}+3 x+y\right) \log _{3}(x+3)$?
I am trying to find minimum of y - 5 x knowing that y Log[3, 3 x + y + 9] == (x^2 + 3 x + y) Log[3, x + 3], x >= 0, y >= 0...
0
votes
0
answers
55
views
How to obtain the output form as Cos[ω t] instead of Cos[t ω]?
When I type
Cos[ω t]
MMA gives me the output
Cos[t ω]
Is it possible to flip the positions of t and ω? Traditionlly, angular ...
0
votes
0
answers
36
views
Modeling with different outputs size
I have lists of input and output. I want to perform the prediction operation but my outputs are different for each input and this causes an error. Can someone help me to write the model in such a way ...
0
votes
1
answer
87
views
How can I show the expression of "Hypergeometric2F1Regularized[1, 1, 1 + n, 1 - p]"?
My formula is
f3 = Integrate[(x*p/(1 - x (1 - p)))^(n - 1), {x, 0, 1},
Assumptions -> 0 < p < 1 && n > 1]
and it gave me
...
2
votes
1
answer
75
views
6
votes
3
answers
119
views
How can I convert $(x - 1)^2 + (y + 2)^2 + (z - 5)^2 - 25 = 0$ to $x^2 + y^2 + z^2 - 2x + 4y - 10z + 5 = 0$?
With Maple, I tried
expand((x - 1)^2 + (y + 2)^2 + (z - 5)^2 - 25 = 0);
and got
With Mathematica, I tried
...
1
vote
1
answer
72
views
Unable to get proper Latex format from Mathematica
Based on this answer, I tried this code
...
2
votes
1
answer
101
views
Making a dynamic table
Given the data below:
...
2
votes
1
answer
133
views
How can I keep the form when I use Expand[2a+3b]^5 and apply to all elements of a list?
I want to keep the form of the expression (2a + 3b)^5. I tried
...
6
votes
3
answers
386
views
How can I output rational numbers in properly formatted parentheses?
I want to output this:
If I input it like that, the output removes the parentheses, leaving just:
What I tried:
...
2
votes
2
answers
144
views
How can I change x -- a into x + a when using Defer?
I have a list
Clear["Global`*"];
list = {{7, 1, -5, 1}, {3, 1, -5, 3}, {5, 1, -3, 1}};
and I use Defer in ...
4
votes
1
answer
100
views
1
vote
4
answers
132
views
What is wrong when I use Length[{a, b, c}] == 3 in this code? [closed]
I want to creat the triples (a,b,c) so that Length[{a, b, c}] == 3, I tried
...
2
votes
2
answers
247
views
How can I create some versions of exercises and get the LaTeX file?
Sometimes, I want to create some versions of exercises with the same content. For example, solve the equations:
$x^2 - 5x - 6 =0$;
$x^2 + 5x - 6 =0$;
$2x^2 + 5x - 7 =0$.
Then I solve each ...
3
votes
1
answer
98
views
How to make pdConv not show the independent variables of functions
pdConv is a very good tool.
How to modify pdConv (or a better way is to add an option?) to make the independent variables of the ...
0
votes
3
answers
184
views
Integrating over an interval
I have a function I want to integrate, which is $v(t)$.
solv = NDSolve[{v'[t] + (v[t])^2 + f == 0, v[0] == -I*k55},
v[t], {t, 0, 150}]
Also, I have a range ...
1
vote
0
answers
62
views
What is another way to write this equations in this list?
I have mylist:
mylist = {{6, 7, 6, 2}, {7, 9, 7, 3}};
Here are two ways that I write equations from mylist:
...