Questions tagged [output]

Questions about the form and content of output returned by Mathematica for a given input or function application. This can include specific differences produced by older versions of Mathematica.

Filter by
Sorted by
Tagged with
0
votes
1answer
50 views

How to change the form of fraction

One of my output result is (2 Sqrt[2/5])/3 Is there any method to let it become Sqrt[8/45] Thank you very much!
0
votes
0answers
35 views

Inactivate Prints inside function?

If one has a piece of code with some prints, he can inactivate them using inactivate, like Inactivate[Print["test"];,Print]; (*returns nothing*) Hower, I ...
0
votes
0answers
40 views

Replacing the print display in a for loop

I am running a For loop as follows: table = {}; For[n = 0, n < 10, n++, {table = Append[table, n], Print[table]}] I was wondering if there was a convenient way ...
0
votes
0answers
40 views

Producing a single $Aborted

Using @Kuba's faboulous answer here (stop notebook evaluation when Assert fails), I produce the following code to stop execution if I am evaluating a long initialization cell while the notebook ...
2
votes
1answer
50 views

Can I change how certain expressions are displayed/printed upon evaluation?

I'm writing some operations for Young tableaus and I would like the evaluation of an expression of type young[a_] to be printed the same as ...
1
vote
0answers
35 views

How to get a smoother color blending on a 3D sphere showing the spherical harmonics?

Here's a manipulate code to show the spherical harmonics mapped on an unit sphere: ...
0
votes
0answers
31 views

.nb file containing large data is not saved correctly [duplicate]

I created a large list of real numbers and saved it to Tes.nb Tes = Sort[RandomReal[{-7., 7.}, 1000000]] But I noticed the size of Tes.nb file was merely 10 KB. ...
6
votes
1answer
49 views

Automatically set x=0, after each input/output ? ($AfterEachInputOutput)

Is it possible to do something that I want, after each input/output automatically and silently? I am looking for a feature like $AfterEachInputOutput in the following code : Example : to set variable ...
1
vote
1answer
44 views

Define the output of PadeApproximant as a function

I am trying to do pad[t_] := PadeApproximant[t Log[t], {t, 1, {2, 1}}] pad[t] // Simplify //Factor pad[1] Plot[pad[t], {t, 0, 1}] The last two lines do not work. ...
0
votes
0answers
31 views

Problems with extracting a row from a matrix

I have a 4 times 4 matrix which has very "large" entries (it takes almost ten minutes to initialize it). Supposing its name its M, I'd like Mathematica to ...
0
votes
1answer
61 views

How should I export data with desired precision to output file

I want to control the number of decimal points in the output file. ...
0
votes
0answers
47 views

Converting Tensor product to Matrix

I have a basic question regarding matrices and tensor product forms. Given $N > 0$, I am interested in the tensor product series $\sum_{i}^{N} X_i$, where $X_i$ is the Pauli $X$ spin operator at ...
1
vote
1answer
60 views

Writing mathematical expression in a file

I am trying to write a mathematical expression as variable = expression in the output file. The current method that I am doing is through ...
3
votes
1answer
52 views

How to force Mathematica to output a function using its alternate pretty form when using Apply? [closed]

By default, Bra is an undefined function. Let's say I have defined Bra, Bra[a___]:=... such ...
0
votes
0answers
95 views

Optimal resolution of a wave equation

I'm not very familiar with numerical resolution of partial derivatives equations in Mathematica, and I would like to optimize the following code. It's about a self-interacting wave propagating in 2D, ...
2
votes
1answer
30 views

Ticks and labels on 3D box, with empty axis in the middle

This is certainly very basic, but rusty as I am with Mathematica, I'm still unable to figure this out. I need to show white empty axes in a 3D graphics, with labels and thicks showing on the exterior ...
2
votes
2answers
89 views

Solve IVP in a implicit form

...
1
vote
0answers
33 views

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

I receive the following output in command line: ...
1
vote
0answers
81 views

Why in Mathematica and Wolfram Engine the result of this code is different?

f[x_] := Evaluate[Input["Enter a function to sum or integrate:"]] Print[f[t]] After starting, I enter x^2. Mathematica outputs $t^2$ while Wolfram Engine ...
0
votes
0answers
19 views

I want to use the output of Solve and/or Reduce in next steps. But the output comes in the form of a rule [duplicate]

In a program I want to use the output of Solve and/or Reduce in next steps. But the output comes in the form of a rule, where what I want is the numerical solution. Here is an example. Say I write s=...
0
votes
0answers
28 views

Remove empty TextCell[] from numerical expression

I am evaluating an expression like this: ...
0
votes
1answer
39 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: ...
1
vote
1answer
52 views

write output to stream and also print it

I tried to save the Print[] output to a file using this code: ...
1
vote
1answer
41 views

Creating a Matrix from Integrals

I have a table of integrals that I want to put in an nxn matrix. I tried doing it in the following way ...
1
vote
1answer
49 views

Solving a Set of Differential Equations and just get the Equations Returned

Long time reader but first time asker for the Mathematica section. I'm trying to solve a set of differential equations and it just returns the equations back to me. I'm not entirely sure why, but ...
1
vote
0answers
54 views

No output after memory constrained short computation using 'Solve'

I am trying to solve a system of nonlinear equations symbolically using Solve. The input runs for only ~30 seconds, then my syntax highlighting goes black, and there is no output: Does this mean my ...
0
votes
0answers
27 views

Suppressing output when defining a function that opens a notebook

I have a command to open a new notebook and generate a reference table. It is basically this with 2+2 replaced by a large table command: ...
0
votes
1answer
48 views

Defined function keeps the variable

I'm a beginner at Mathematica, and I have a problem finding the roots of a function for a specific variable (using Jens' findAllRoots function). Due to the nature of my problem, I need to compute ...
1
vote
2answers
31 views

Clear Style to standard output expressions in the same cell

I would like to reset an expression in a Standar Output inside a Cell. For example, ...
1
vote
1answer
50 views

Excel output append

I currently have the following codes: ...
6
votes
1answer
71 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
64 views
0
votes
1answer
36 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 ...
5
votes
1answer
155 views

How can I prevent Mathematica from cutting sentences in the middle when printing strings?

I have a very simple but annoying problem. Consider the following example: ...
2
votes
0answers
42 views

How to copy and paste special characters out of Mathematica [duplicate]

I'm doing a bit of string manipulation, and the output has Greek characters in it. I want to be able to copy and paste those Greek characters out of Mathematica and into another file. For example, ...
1
vote
1answer
65 views

Mathematica outputs its input; Eigensystem [duplicate]

I am simply trying to find the eigenvalues of a symbolic matrix using Matematica, but it does not give me an answer; it just outputs its input. (u is a parameter) ...
1
vote
0answers
47 views

With a Large output, clicking Show all or Show more freezes Mathematica

Running the following code takes about 30 min on my laptop (everything before the Reduce is instant) and produces a Large output ...
0
votes
1answer
40 views

Replacement of Output in Brackets

For my programm I have a section where I have to introduce coordinates for my prestressedsteel bars or cords and the associated area in Form of {{X1,Y1,Area1},{Xi,Yi,Areai}}. For my further ...
6
votes
2answers
270 views

How to write a string verbatim

I'm trying to write a function which takes some strings, manipulates them, and writes the result to a file. Here's a small example which recreates the behavior I'm seeing: ...
1
vote
0answers
44 views

Result not evaluated [closed]

When I type: QuantityMagnitude[3.4 m] I got only the same sentence as a result. I am expecting 3.4 Trying to figure out what ...
1
vote
0answers
30 views

Output with cases. How to interprete the case `True'? [closed]

I am performing the following integration Assuming[{r > 0, s > 0, a == 2}, Integrate[s^(2 - a)/Abs[r - s] s^2, s]] and I get two cases for the output. ...
1
vote
0answers
24 views

For ``Formulate'' and then Hold/Print Maths expressions?

I have written a function myPfuntest, ...
2
votes
0answers
48 views

Refer to future output

in my notebook I would like to present output that follows from some code later on in the notebook. E.g. on page 10, in the appendix, I have a code producing a graphic, which I name graphic1. On page ...
1
vote
0answers
24 views

Returning only part of a list after a function call to save memory [closed]

I need to get only V of a singular value decomposition of a matrix. In MATLAB I could write: ...
3
votes
2answers
245 views

What does $ mean in an output? [closed]

Solving a function in more than one variable, Mathematica gives me output in this way: name_variable$number instead of giving me a number. I looked for symbol: $ online, but unfortunately I ...
2
votes
1answer
146 views

How to write a formatted data into a text file?

I have a function which is written below ...
1
vote
1answer
75 views

How to format output numbers like 0.?

I have a function which is given below. If my number, n is 0. or 1. the function gives 0.E0 or 1.E0, respectively. However, I would like to form it as 0.0000E0 or 1.0000E0 like the other numbers given ...
1
vote
0answers
59 views

How can I force the output of a computation to be as compact as possible, yet complete, by using functions?

I am computing some derivatives in Wolfram Mathematica 11.3. The functions that I have to differentiate (with respect to the state variables) are the equations of motion of a rocket in the atmosphere. ...
1
vote
1answer
53 views

Formatting output for use in forums etc [duplicate]

If we take the (simple) example x = 1; y = 2; z = 3; x + y + z we get the (complete screen) result when copying into a more basic interface, such as a web forum ...
1
vote
1answer
155 views

Correct use of Reap/Sow to optimize the code

I am trying to compare two functions on the end points of an interval. For instance, $f_1(t)=t^3$ and $f_2(t)=t^4$. From my code below I check whether $f_1(t)\leq f_2(t)$ when $t=50$ on $[50, 51]$ ...

1
2 3 4 5 6