Questions tagged [output-formatting]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
24 views

How do I separate the two solutions?

Consider the differential equation $$f''[x]==a f[x]$$ The result is a combination of trigonometric or hyperbolic functions, something like: ...
0
votes
1answer
49 views

Exporting string with newline and tab symbols to LaTeX

We have a string that has "tab" symbol between letters "B" and "C" and "newline" symbol between letters "C" and "D": Input: ...
4
votes
1answer
75 views

Force results to be displayed in a way often seen in traditional math [closed]

I want to get my output in the form that I would write by hand. I have tried with TraditionalForm, but it did not work. I've looked at several answers in this SE ...
1
vote
0answers
32 views

In warning messages, can multi-storey expressions be flattened?

I receive the following output in command line: ...
1
vote
1answer
56 views

Hiding the result of a calculation in an interactive panel until all the inputs are entered

I created a partial fraction calculator using the Mathematica command Apart. The image below displays the value 1 before the numerator and/or denominator are entered. How can the code be fixed so that ...
2
votes
0answers
31 views

Padding decimal output with ending zeros

I want to pad with ending zero and tried the following code ...
0
votes
3answers
52 views

How can I display an expression in unevaluated form?

How can I display an expression in unevaluated form? TraditionalForm[2*3^3 + 5^2] I´d like to obtain 2*3^3 + 5^2 displayed in traditional form without being ...
0
votes
1answer
37 views

Mathematica not computing Matrix problem, just returning multiplication expression [closed]

I'm doing some very simple matrix operations in Mathematica, but for some reason, the last operation I'm trying to evaluate is not returning the actual product, just shows the symbolic multiplication. ...
1
vote
0answers
33 views

How to change behavior of Echo or turn it off without removing it from code?

I wish to use Echo for output of intermediate results if an OptionValue I call ...
1
vote
1answer
31 views

How to get function to 'expand' while inactivating inner functions

This is sort of a two question problem: Question 1 So I have a function as follows f[x_] := x + 2; I want a way to have a statement such as: ...
2
votes
2answers
96 views

Colouring faces of a graph according to an overlap of edges

I have a basic graph such as the following; ...
5
votes
1answer
90 views

Stacked/Percentile Bar Chart formatting

There seem to be a lot of questions regarding the formatting of bar charts. Sadly, I couldn't find solutions to my problems, despite all the skimming. Apologies if I missed something. Problem ...
0
votes
1answer
35 views

Convert expression to LaTeX string

How do I convert a Mathematica expression to the equivalent TeXForm string as shown when applying TeXForm? For example: ...
0
votes
1answer
45 views

Plot is cutting off axes labels

I am trying to create a plot with the axes labelled and for some reason the x axis label is getting cutoff. I've tried resizing the plot and it does not fix it. I am using the following code: The ...
4
votes
1answer
74 views

Highlight part of the expression like this

I want to highlight the coefficient of the polynomial is not ±1, I have tried ...
1
vote
0answers
24 views

Export table of mixed data without shortened decimal notation?

My question is similar to this one, except the solution presented there does not work in my case since my table contains strings as well as numbers. I would like to export data such as ...
1
vote
1answer
40 views

write output to stream and also print it

I tried to save the Print[] output to a file using this code: ...
4
votes
2answers
102 views

Convert Derivative[1][f] to f'

I believe this is a little problem that everybody asking or answering ODE related question in this site suffers. We know derivative of a variable, say, f, can be ...
3
votes
2answers
54 views

How to automatically center the alignment of all output cells?

How can one change the default output alignment from left to center?
2
votes
0answers
55 views

What is the meaning of this weird square root expression? [duplicate]

I am using Mathematica to find the eigenvalues of this matrix m m = {{2, I, 1, 2}, {-I, 2, I, 1}, {1, -I, 2, 1}, {2, 1, 1, 2}} Eigenvalues[m] However, this gives ...
1
vote
1answer
63 views

Log plot and linear plot plotted in one view

I have the following code: ...
4
votes
1answer
49 views

Custom object display in Dataset using MakeBoxes

The below code defines a couple "objects" in the Mathematica sense using a convention consisting of so-called Q-functions for creating types and data validation, ...
0
votes
1answer
36 views

How can I create a form-like interface in Mathematica, suitable for Mathematica Player?

I want someting like: f(x)=(imput field) [Calculate] (button) Result=(output field)
1
vote
2answers
90 views

How to obtain the Gauss-Seidel iterative results in this form?

I need to use the Gauss Seidel iterative method to solve the linear equations $\left\{\begin{array}{l} 8 x_{1}-3 x_{2}+2 x_{3}=20 \\ 4 x_{1}+11 x_{2}-x_{3}=33 \\ 6 x_{1}+3 x_{2}+12 x_{3}=36 \end{array}...
-1
votes
1answer
51 views

How do I solve this matrix equation with positive definite matrix constraints? [closed]

I need to determine the range of a that makes the iteration formula of matrix $\left(\begin{array}{lll} 1 & a & a \\ a & 1 & a \\ a & a & 1 ...
5
votes
3answers
91 views

How do I turn off StandardForm formatting for Piecewise, KroneckerDelta and ConditionalExpression?

I find the StandardForm formatting for Piecewise, KroneckerDelta, and ...
3
votes
1answer
55 views

Disallow line breaks in long Row

I'm displaying a long row of images with a horizontal scrollbar that should make the images 'go off the screen' to the left or right, instead of wrapping to display all the images on multiple lines. <...
2
votes
2answers
67 views

Information/Information`InformationValueForm using Full- or InputForm

I have a problem with the build-in Information function for user-defined symbols with custom StandardForm in Mathematica 12.1.1.0: For example with the function ...
1
vote
1answer
43 views

Excel output append

I currently have the following codes: ...
2
votes
1answer
91 views

How to find formula from a table?

I recently started using mathematica for simple tasks like simplifying etc. First of all let me say if this breaks any rules I apologize since I'm a novice in using this and I'll remove the question. ...
2
votes
2answers
84 views

How to output Taylor formula in this format?

I want to write a custom function that outputs the Taylor series as follows: $$f(X)=f\left(X^{(0)}\right)+\nabla f\left(X^{(0)}\right)^{T} \Delta X+\frac{1}{2} \Delta X^{T} G\left(X^{(0)}\right) \...
0
votes
1answer
52 views

A comma and a semicolon in For [closed]

Here is the first one. i = 1; For[t = x, i^2 < 10, i++; t = t^2 + i, Print[t]] This will output x 2+x^2 3+(2+x^2)^2 But I ...
3
votes
3answers
67 views

How can I transform linear equations into the form $a\,x+b\,y+c=0$?

I have a bunch of line equations generated by the following code: ...
1
vote
2answers
54 views

How do you format a polynomial output so the coefficients and variables aren't combined into a fraction?

Suppose a computation gives the polynomial as its output. I'd like to know how to format the output similarly to the input line of the screenshot below. Mathematica's output likes to combine fractions,...
6
votes
1answer
102 views

How can I make a dataset with one element display with a header row?

I'm building a virtual lab exercise in Mathematica. As part of it, I'm using Dynamic to show the students' lab dataset that they store in memory using a ...
2
votes
2answers
125 views

Expanding logarithms in the negative domain

I am trying to expand some functions $f(z,\bar{z})$ containing logarithms for $z = x + i k x$ with $x<0$, but the results are not always consistent. As a simple example, consider the following code:...
1
vote
1answer
42 views

What is the best way to color alternative rows but by values in a particular column of a dataset?

Consider the following dataset as an example (the actual dataset is very large and has more columns so I am looking for an efficient method): ...
4
votes
2answers
157 views

Reformatting a table to save vertical space

To save vertical space, how can I convert a $c$ column $r=kn$ row table to a $ck$ column $n$ row table? E.g., a $6=3\cdot2$ row $3$ column table to a $3\cdot3=9$ column $2$ row table; ...
6
votes
1answer
68 views

How to make Mathematica only output the error name, rather than the full error message?

For example, when I use LinearSolve, an error message might be encountered: ...
1
vote
2answers
59 views
2
votes
1answer
81 views
0
votes
1answer
31 views

Why is a simple vector list inside Row not rendering in MatrixForm when passed in as an argument to a user defined function?

I stripped down a function makeRuleRow down to its bare essentials (of irrelevant descriptions) to understand why my vector list ...
3
votes
1answer
94 views

Associate a title to columns in a data set

I am using a dataset to construct a matrix, how can I add the title Mass in kilograms above the Earth and Moon like in the table. Here is the code I am working on. ...
0
votes
0answers
36 views

Using Experimental`OptimizeExpression for expression optimization

I am trying to optimize the following expression (example only) expr = Normal[Series[(1 - y - 2 z)^-2, {z, 0, 3}]] whose output becomes ...
0
votes
0answers
39 views

Write Tensor Product in Matrix Form

I want to write the tensor product A $\otimes$ B in matrix form, where\begin{equation} A= \left[ {\begin{array}{cc} 1 & 2 & 3\\ 4 & 5 &6 \\ 7 & 8 &9 \\ \end{array} } \...
1
vote
1answer
31 views

Formating of cells with Dates on Exporting [closed]

I am trying to export a matrix into a .CSV file which has dates with format: Year/Month/Day. When I try to export it into a CV those cells are converted into Day/Month/Year When I try to export it ...
4
votes
2answers
107 views

How to control the output of Polygon

In the documentation article for Polygon in Mathematica 12, there is an example with the input: ...
1
vote
2answers
86 views

How to change the expression of the result of function `LinearSolve`

I want to solve the following linear equations: $$\left\{\begin{aligned} x_{1}+3 x_{2}+x_{3} &=0 \\ 2 x_{1}+6 x_{2}+3 x_{3}-2 x_{4} &=0 \\ -2 x_{1}-6 x_{2}-4 x_{4} &=0 \end{aligned}\right.$...
0
votes
0answers
56 views

Can you create a list of pairs? Not a list of list

Is it possible to get this:{(x1,y1),(x2,y2),(x3,y3)......} -> This is a list of pairs. Not a list of list. x would be the input into a function, y would be the output. If not, I will have to create ...
2
votes
0answers
69 views

How to obtain input and output of a function as a pair? [closed]

I thought this was going to be simple. But, I just wanted to print the input and the output of a function as a pair. But, I can't find it. I found this on another questions and this works(this was ...

1
2 3 4 5
22