Questions on changing Mathematica expressions of one type or format to another, for example date formats, Boxes and other typesetting representations, or different units of measurements.

learn more… | top users | synonyms

5
votes
1answer
83 views

How to get “one Cell - one line” code format inside of NB files?

The PageWidth option controls the way the Cell's content is displayed, not the manner it's written in a ...
5
votes
1answer
73 views

How to convert arbitrary raw boxes directly into String?

This question is motivated by the recent question about searching inside of the NB files. According to the Documentation, ToString expects a high-level WL ...
17
votes
2answers
278 views

Understanding evaluation and typesetting

Background So, one could be surprised by the fact that: Hold @ Grid[{{1, 2}}] (*or*) Hold @ Graphics @ Disk[] This issue and methods of prevention are ...
7
votes
1answer
119 views

ToExpression and ToBoxes aren't inverses of each other?

Applying ToExpression and ToBoxes repeatedly to Hold[1/1] gives many ...
8
votes
2answers
82 views

Reading Cells or Boxes expression by expression

Let's say we have a cell: (*newline*) (*newline*) Plot[ x, {x, 0, 1} ] (*newline*) Plot[x, {x, 0, 2}] How to read it expression by expression? ...
2
votes
2answers
306 views

Simplify results further

I have an extremely long result in polynomial form following some matrix operations. However, given the symmetry of the problem, I can safely say that the solution will reduce much further than is ...
1
vote
1answer
66 views

How to convert Image3D object into Graphics3D object and vice versa?

There are some rendering options (for example, Lighting) which are associated with the Graphics3D objects. I cannot apply these ...
6
votes
1answer
158 views

How convert old version 2.2 .ma files to .nb notebooks?

I have a lot of old Mathematica version 2.2 .ma files that simply crash the current (10.4.1) version of Mathematica if I try to open them. Is there some way to ...
4
votes
3answers
478 views

Converting inequalities to intervals

I have an inequality, ie: 1.57116 < g < 14.1405 There will be a large set of similar inequalities, and I want to find the intersection of them all. I figured it would be easier to convert the ...
2
votes
1answer
92 views

Can one prevent $\TeX$ conversion from changing form of expressions?

This is similar to my previous question Can one prevent operators like `Factor` or `Apart` from changing full form of some algebraic expressions? but concerns $\TeX$ and I cannot figure out whether I ...
2
votes
1answer
59 views

$CellContext issue while trying to export the current output of a Manipulate

Having just read this question Getting variables out of Dynamic Modules after restoring the program and the Kuba's answer I'm trying to optimize my workflow. I'm writing a Mathematica notebook to ...
10
votes
1answer
89 views

Arrows from GraphicsComplex not converted to Normal form correctly

Bug introduced in 7.0 or earlier and persisting through 10.4.0 Show @ Graph[{1 -> 2, 2 -> 3}, Frame -> True] Normal @ % Is this a pure bug, or have ...
3
votes
1answer
51 views
7
votes
1answer
108 views

How to replicate v9's color conversion to LAB under v10

Mathematica 10(.0.0) appears to use a different flavor of the LAB color space, but I would like to emulate the same behavior observed in version 9(.0.0). v9 ...
5
votes
2answers
98 views

How can DateObject handle calender weeks

I have dates given for a TimeLinePlot. These dates are in {year,week} format. DateObject ...
5
votes
1answer
146 views

Why Base64 ends with a newline? (\n)

Why everything converted to Base64 has a newline at the end? It isn't one of base characters, is it? ...
3
votes
0answers
87 views

WDF specification?

Motivated by a recent question on the meaning of all sorts of W* acronyms, I would like to get more information about the Wolfram Data Framework (WDF). On its web page ...
5
votes
1answer
79 views
21
votes
8answers
4k views

How to express an integer number in English words?

How do I convert a number to a readable string? I would like to implement a function, inWords[], inWords[n_]:= ? which ...
1
vote
0answers
66 views

Convert large KML coordinate datasets to UTM [closed]

I was wondering if there are ways to convert massive amounts of KML coordinates into UTM coordinates using Mathematica. Other programs would also be acceptable. Thanks. I have the KML file from ...
2
votes
0answers
129 views

Read in bezier curve from svg file

I am trying to do some calculation of some svg file,After read in with Import["filename","XML"]and some easy operation, I can get the string of the bezier curve, ...
4
votes
1answer
62 views

convert MeijerG to form Standard Functions in Mathematica

I'd like to convert MeijerG[{{}, {1., 1.}}, {{0., 0., 4.}, {}}, -1. T λ] to its Standard Functions (For example Bessel function or ...). Any suggestion?
0
votes
0answers
42 views

Possible bug of Exporting as HTMLFragment at Linux

This is the result of Mathematica 10.0.2 of Linux Version. There are two style inside one tag, and this fragment cannot be Imported as XML by Mathematica. This is the result of Mathematica 10.1 of ...
0
votes
1answer
68 views

Electromagnetism units conversion in Mathematica 10 (possible bug)

Is this a bug in Mathematica 10? Why can't I convert Amps/m to Gauss? ...
24
votes
2answers
1k views

How do I extract the contents of a selected cell as plain text?

My aim is to extract the contents of an Input cells as plain text. Ideally I would like to be able to select one or more Input cells and press a button which would then extract the text from these ...
3
votes
1answer
69 views

Whitespace is lost during MathML -> XMLElement conversion

ImportString["<mtext> </mtext>", {"MathML", "XMLElement"} ] XMLElement["mtext",{},{}] while I'd expect: ...
2
votes
0answers
100 views

Export Mathematica to $\LaTeX$ properly

I am simply trying to convert an existing sample in Mathematica to $\LaTeX$. For example, if I open a new Mathematica notebook using styled templates such as Journal article and save it as $\TeX$. ...
1
vote
1answer
41 views

FromDigits gives “not a list of digits” error for integer string in StringExpression rule of StringCases

I have large StringExpression that is used in StringCases. Some of the parts being pulled out are integer strings. These pull ...
8
votes
3answers
235 views

Incompatibility of Row and TeXForm

Bug introduced in 9.0 and persisting through 10.1.0 or later Update: Since no one has been able to give a reason for this change in behavior or provide a solution I am tagging this as a bug. ...
8
votes
3answers
239 views

Graphics in Notebook Different from Graphics Expression?

Consider the expression TreeForm[a+b^2+c^3+d] which displays as This is a nice Graphics object, as I can prove by typing ...
2
votes
0answers
51 views

How to convert a list of polynomials into a list of equations and plug into Contourplot? [duplicate]

Given a list q of polynomials (output of GroebnerBasis) in two variables I want to transform the list into a list of equations and plug it into CountourPlot. For ...
5
votes
3answers
276 views

Converting between AbsoluteTime and Unix time

By trial and error, I've found that the following gives the current Unix time: AbsoluteTime[] - UPOCH where UPOCH can be defined in any of the following ways: ...
3
votes
2answers
152 views

What's real analogue for FromDigits?

FromDigits only works for integer strings. What's its real-number analogue?
4
votes
5answers
149 views

How can I convert a Piecewise into a nested If?

For later conversion into a programming language where if is the only conditional construct, I would like to convert a Piecewise ...
3
votes
1answer
86 views

Converting path list to the nested list

I'm trying to convert the plain path list to the nested tree list like the following codes. ...
0
votes
2answers
205 views

Decimal-to-ASCII conversion

I have to write a program that converts a number (decimal notation) to an ASCII string. For example, x = 26728 (or 0x6868) and the string is "hh". I wrote this, but it seems that it is not the ...
3
votes
1answer
148 views

ConversionRules and style inheritance

Take the LaTeX-Article stylesheet stylesheet = FileNameJoin[{"Article","LaTeX-Article.nb"}]; Compare these outputs ...
1
vote
1answer
2k views

Conversion of Sine to Cosine

I'm solving equations with many Cosines and Sines. And I want to convert all the Sines to Cosines using trigonometric formulas such as cos(x)=sin(x+pi/2). How can I do this?
2
votes
2answers
64 views

How do I extract the value of a 'Style'?

I have a Style displaying an underlying Real value. For example I might have ...
10
votes
4answers
404 views

Built-in way to convert Integer to Ordinal String

Is there a built-in way to convert an integer into its ordinal string representation (as per this page). That is, something akin to ...
0
votes
0answers
36 views

Strange style conversion indicator appeared when type “a Pre”

I got the following strange style conversion indicator when I was typing a Pre(character a and ...
7
votes
6answers
3k views

Convert a string into a list of numbers

I got the following problem I don't know how to solve or if it's at all possible to solve(I'm quite new to Mathematica and don't have an IT background, so please explain slowly if possible:)) I'm ...
4
votes
2answers
557 views

Conversion of 3D plot to 2D Contour Plot

Is it possible for Mathematica to convert a 3D plot into a 2D contour plot without having to recompute the values for each point? I realize that looking directly down at the 3D plot will be similar to ...
8
votes
0answers
172 views

TeXToBoxes and BoxesToTeX BoxRules options

A recent question has gotten me to look more into the tex conversion rules. Consider the following latex string: ...
0
votes
1answer
1k views

How to convert sine wave into square wave? (analog to digital signal)

I've got this plot with two sine waves and what I need is follow: Amplitude values can diverge from time to time like here min 100 and max 700 but another time it's 300 600. I guess I will not be ...
2
votes
1answer
142 views

Convert frequency counts to long notation in Mathematica

I have a series of frequencies of values, e.g. 5 times 1, 10 times 2 and 5 times 3, as in list={{1,5},{2,10},{3,5}} and I would like to convert this to long ...
9
votes
2answers
292 views

Working with Java hashmaps from Mathematica

I'm using J/Link to access data from an external Java program. The data are represented as a ConcurrentHashMap (see the official specification here). ...
1
vote
2answers
590 views

Converting expression into string without evaluating it

How can one convert a Mathematica expression into a string without the expression being evaluated first? I tried using Hold, but it returns ...
6
votes
2answers
2k views

How to convert a string of number into real numbers without precision loss

I searched and did not find similar answers which can resolve the 'no precision loss' issue. A sample string is: ...
0
votes
3answers
207 views

Conversion of binary matrix of mlf into multilinear function, any ready function for this?

I convert here only one term $x_1x_3x_7$ from the binary matrix by first getting the reversed binary 1010001 and then miggling with the data. I know I could convert the columns into binaries and then ...