# Questions tagged [conversion]

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.

202 questions
Filter by
Sorted by
Tagged with
490 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 ...
781 views

### HoldForm does not Hold Form for fractions sometimes

I'm facing a strange behavior of HoldForm. I need to display 1/2*3/4 in LaTeX like this : $$\frac{1}{2} \times \frac{3}{4}$$ ...
213 views

### ConversionRules and style inheritance

Take the LaTeX-Article stylesheet stylesheet = FileNameJoin[{"Article","LaTeX-Article.nb"}]; Compare these outputs ...
51k 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?
84 views

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

I have a Style displaying an underlying Real value. For example I might have ...
195 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 ...
1k 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 ...
48 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 ...
1k 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 ...
502 views

### Incompatibility of Row and TeXForm

Bug introduced in 9.0 and persisting through 11.0 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. Please report it ...
33k views

### How can I create an empty JSON object?

For creating non-empty object, I use following syntax ExportString[{"key" -> "value"}, "JSON"] (*{"key" : "value"}*) But how can I create an empty object? ...
542 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 ...
13k 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 ...
2k 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 ...
407 views

### Read in Bézier curve from SVG file

I am trying to do some calculation of some SVG file. After reading in with Import["filename", "XML"] and some easy operation, I can get the string of the Bézier ...
239 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 ...
269 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 ...
407 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). ...
1k views

### Visualize a tree structure using TreeGraph

I have a code that generates a tree of graphics objects. The structure can be visualized like this, with each Rule constituting a parent child relationship: ...
1k 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 ...
1k views

### How do I convert imported STL files to 3D images?

After importing a 3D image in STL format, my possibilities in regard to "3D Volumetric Image Processing" seem rather limited. All examples are given with TIFF files. Is there a way to convert from STL ...
3k 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: ...
240 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 ...
69 views

### How to get monomials multiplied by each other?

Suppose Subscript[x, #] & /@ {1, 3, 7} that returns {x_1,x_3,x_7}. Now how can I get ...
241 views

### Old notebook (Version 3) not opening in version 9

I have some old notebook files in version 3 format from the book "Mathematica for Physicists". These files are blank except for the chapter header when opened in Mathematica 9. I have similar ...
94 views

### Command to change binary mlf terms into Subscripted mlf terms?

I express multilinear functions in the following format. Is there any ready command to convert them to multilinear functions easily? Input ...
9k views

### Convert Integer to Real [duplicate]

Is there a preferred way of converting an Integer to a Real? What I'm using at the moment is ...
608 views

### Transform Piecewise[] into sum of indicators

I'm interested in transforming a piecewise defined function into a sum of indicator functions, ultimately with the aim to be better able to integrate them. As an example I would like to transform the ...
1k views

### How to convert Graphics3D object into an Image3D object?

How does one convert a Graphics3D object into an Image3D object? E.g., start with ...
1k 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 ...
84 views

### Will aliasing the Quantity and UnitConvert functions to “in” and “to” create problems?

It seems that there is a lot of interest in enhancing the use of units in Mathematica; various solutions in the name of brevity, correctness, and general utility have been demonstrated. I've begun ...
315 views

Is it possible to convert the following list of strings to computable numbers with the comments preserved? ...
15k views

### Converting Mathematica to $\LaTeX$

Is there a Mathematica-to-$\LaTeX$ converter, so that I can place Mathematica code, including things like A // MatrixForm, just as they are in the console straight ...
174 views

### How to convert a spaceless data into tab delimited

I have a data set in form of:(this is just an example) 1324501020 3241030205 4332020134 the data are stored in a text file (e.g. data.txt) but I need to convert ...
221 views

### How to get rid of trailing string after using Convert?

Convert[0.05263, Percent] /. Percent -> "%" I would like to remove the trailing "%" but if I put Percent->"" it concatenates a literal empty pair of quotes. ...
657 views

### How do I remove the subscript after calling BaseForm[]?

Say I want to convert some number $N$ to base $k$. Here, I might use the command BaseForm[N,k], e.g.,BaseForm[10,...
175 views

### Convert a list with three arguments {x0,x1, step} into an equidistant table?

How can I convert a list such as: a = {1, 2, 0.1} into sequence so that I can pass them into a function, e.g. I want to be able to do something like this ...
8k views

### The correct way to linearize colorspace before resizing, blurring etc

There was an interesting discussion on MathGroup dealing with the fact that image-processing functions in Mathematica (and many other software, including Adobe Photoshop) work with RGB, Grayscale etc. ...
3k views

### Combine multiple PDF files into one document

I have multiple single page PDFs I'd like to join together into a single file. (Obviously I mean the file format and not the probability distributions here!) I'm aware of free online services such as ...
275 views

### Why doesn't Normal[] work?

I have a polygon on which I'm applying a GeometricTransform and I want to get the coordinates of the transformed polygon. ...
328 views

### How can I convert the dates returned by FinancialData into decimal representation?

I'm trying to run a regression using Fit on the output of FinancialData["SPY", "Jan. 1, 2011"]. However, the dates returned ...
224 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: ...
515 views

### How to write aligned equations and export them HTML/TeX

This question is mainly about exporting to HTML/TeX. For those of you who do not know how to write aligned equations in Mathematica please see this answer. Lets assume that you modified your ...
272 views

### Inline cells and conversion rules

In the following link you can find the following about ConversionRules when exporting to HTML: specifies mappings from Mathematica cell styles to HTML elements, ...
1k views

### Creating and editing new stylesheets

I'm trying to create a stylesheet, but the process has become painful. I'm sure that this has to do something with resetting something in Mathematica everytime I make changes to the stylesheet. To ...
973 views

### Exporting numbered equations to HTML/TeX using conversion rules

This question is a follow up from this one. It may also be considered a duplicate since I have already asked this question in stackoverflow almost a year ago. For a background on using numbered ...
1k views

### Exporting notebook to HTML, using conversion rules

The idea is to export the whole notebook to HTML with all the math equations in latex form. In this way we can add the mathjax script and it will take care of the math. Suppose we have the following ...
953 views

### How to convert between various ItemSize/ImageSize units?

How can one convert between the implicit units used by Grid (ems and line height for horizontal and vertical dimensions) and printers points (in ...