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.

Filter by
Sorted by
Tagged with
4
votes
5answers
215 views

Convert decimal value to hexadecimal

How can I convert for example 62343 to a hexadecimal value 45 to a hexadecimal value ? I see I can use: IntegerDigits[62343, 16] = {15, 3, 8, 7} ...
3
votes
0answers
57 views

Is it possible to turn “FunctionResource” Notebook into ResourceObject or registered LocalObject without FrontEnd?

TL;DR The problem boils down to how to convert a correctly prepared submission Notebook into a ResourceObject suitable for ...
9
votes
4answers
747 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} $$ ...
4
votes
3answers
107 views

Converting between XML and JSON?

I can't seem to find a way to convert between an XML string and RawJSON: ...
2
votes
1answer
100 views

Convert Wolfram code into C language [closed]

Here is my Mathematica code: f[x_] := x^2 + 4 x + 4; Solve[f[x] == 9, x] I tried to convert it to C but failed. Here is the code for conversion: ...
3
votes
1answer
43 views

Converting Emacs Org-Mode Table to Mathematica Datastructure(s)?

Is there a way automatically/programmatically convert an org-mode table ...
6
votes
1answer
103 views

Cell ► Convert To ► Bitmap: FrontEndToken for a specific menu item?

I've seen good discussions about the full list of FrontEndTokens. But I could not figure out how to find a specific ...
13
votes
2answers
219 views

How do you import “ISODateTime” and capture the time zone?

Bug introduced in V10.4 or earlier and persisting through 12.0 (CASE:3920785) Back in version 10.2 or so, Mathematica began supporting the ISO 8601 date/time format, which is nice because it's used ...
6
votes
4answers
580 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 ...
14
votes
4answers
265 views

How to convert this term to a Hypergeometric function?

term=8*(-1)^(1/4)*Sqrt[b]*q0^(3/2)*\[Kappa]* EllipticF[I*ArcSinh[((-1)^(1/4)*Sqrt[b]*r)/Sqrt[q0]], -1] This is a physical term and it is not convenient to appear ...
1
vote
1answer
102 views
10
votes
1answer
243 views

A bug in Rasterize and Graphics: diagonal line is under-diagonal

I plot a straight diagonal line and then simply rasterize it. Consider what happens (Mathematica 8.0.4, 10.2, 11.1.1 and 12.0 on Windows 7 x64): ...
6
votes
3answers
324 views

Looking for PostScriptForm or ForthForm to print expressions as RPN code

Mathematica has very useful functions CForm and FortranForm. I want the same for a different language: ...
1
vote
1answer
31 views

StandardForm to Infix form conversion is working but Infix to StandardForm not working. Why?

I have a function f1 with three inputs: x1,y1,z1. I have ...
2
votes
1answer
144 views

Is NumberForm double rounding numbers?

A number like 0.644696875 is represented internally as 0.6446968749999...: N[FromDigits[RealDigits[0.644696875, 2], 2], $MachinePrecision] (* 0.6446968749999999 *) ...
8
votes
1answer
98 views

DateObject granularity conversion

Is there a way to convert the DateObject whose FullForm is: ...
5
votes
2answers
147 views

Convert String to Integer from a huge string database in a very fast way?

I have a huge string database with the form such as {{position},{1,2,3,4,5,..}}, and I want to convert such database to Interger data in a very quick way. In the following example, I created a ...
13
votes
3answers
442 views

How to extract something from DelaunayMesh and similar family of functions

I was looking at this question here and I tried the suggested idea by Anton Antonov to use DelaunayMesh It will look like this: ...
3
votes
1answer
104 views

MakeExpression can't deal with FE boxes riffled with whitespaces

Bug introduced in 8 or earlier and persisting through 12.0 CASE:3910218 When you input { 1 , 2 } (*spaces intended, retype them if you want to copy this*) ...
3
votes
0answers
151 views

Notebook (.nb) → Jupyter (.ipynb) conversion without Mathematica?

Is there a way to convert Mathematica Notebook files (.nb) to Jupyter files (.ipynb) without using Mathematica?Is there a free online utility or other piece of software that can do this?
8
votes
1answer
124 views

Errors in converting LaTeX using ToExpression

I am trying to write a function which takes Maple Latex generated, feed it to Mathematica, use ToExpression then convert it back to Latex. This is because ...
1
vote
1answer
51 views

Convert string to conditional operator

I have a RadioButtonBar with a selection x = None; {RadioButtonBar[Dynamic[x], {lt, le, eq, gt, ge}], Dynamic[x]} Once a radio button is selected, I would like ...
5
votes
3answers
205 views

Convert graph format for Mathematica graph functions

I have an output of many large graph files, specified by pair of vertices, in a format like ...
0
votes
0answers
23 views

Export HTML + MathML is skipping some math. Why? How to fix?

Using Mathematica's HTML export feature with MathML often skips some expressions, instead rendering them as plain HTML instead of MathML. Probably, in the options there is a way to force it, but how? ...
7
votes
2answers
239 views

How to convert dayname to number?

When I input DayName[{2012,12,24}] I get Monday as output. What is the most effective way to convert Monday into 1, Tuesday into ...
9
votes
4answers
250 views

How can one convert an expression to a string while keeping the quotation marks of strings that are part of the expression?

How can I for example convert {"a","b"} to "{\"a\",\"b\"}", so keeping the quotations marks.? I tried ...
9
votes
3answers
412 views

Create Array from list of indices/values

Is there is a performat way to convert something like {{0,0},a},{{0,1},c},{{1,0},d},{{1,1},e} into {{a,b},{c,d}} The ...
4
votes
1answer
54 views

Unable to convert degree to number in LatitudeLongitude and “City” Entity

I am trying to convert degree to number for some mathematical transformation. Taking London as an example, the following codes can convert the degree into a number without any problems: Codes that ...
5
votes
6answers
294 views

How to convert a list of digits to a string in Mathematica

I want to convert a list of digits to a string, for example from {1,2,3,4,5}, I want to get the string 12345. The following will work as long as the list does not ...
6
votes
1answer
108 views

TeXForm doesn't work in wolframscript?

Consider that $ wolframscript -cloud -code 'TeXForm[ (d u)/(d t)]' TeXForm[u/t] yet I don't have a local wolframscript kernel installed. Is this something ...
3
votes
0answers
39 views

Efficient conversion of a ByteArray object into a hexadecimal string

What is the best way to convert ByteArray objects into hexadecimal string representation? Although the following works, I find it questionably awkward (and likely ...
0
votes
1answer
79 views

How do I treat polynomials as vectors?

From time to time I find myself in the following situation. I have generated a list of polynomials from some ring $R=\mathbb R[x_1,\ldots,x_n]$ and now I wish to view these polynomials as vectors in ...
0
votes
0answers
42 views

How to convert {x -> 4} to simply 4? [duplicate]

I am using the Solve function to obtain two solutions for a quadratic, then I want to use those two solutions as input for something else but I can't because they are in the form of (x->number} ...
1
vote
1answer
62 views

How to encode the character into UTF-8?

As we know the café is caf\xc3\xa9 after encode by UTF8: >>> 'café'.encode('utf8') ...
0
votes
0answers
34 views

Programmatically get InputText of box structure without spaces

I am looking for a way to get something similar to the "Input Text" form of an arbitrary box structure, but without the extra whitespaces. Before I explain the requirements in a bit more detail, let'...
6
votes
2answers
213 views

How to convert a RawArray of bytes to ByteArray?

A ByteArray can be converted to a RawArray: ...
13
votes
1answer
220 views

Arrows from GraphicsComplex not converted to Normal form correctly

Bug introduced in 7.0 or earlier and persisting through 12.0 Show @ Graph[{1 -> 2, 2 -> 3}, Frame -> True] Normal @ % Is this a pure bug, or have I ...
0
votes
0answers
74 views

A way to calculate colour from wavelength?

I'm trying to create a script taking my experimental values of measured radiance and turn it into xyz and rgb colour values. I import table with colour matching functions from here -http://cvrl.ucl.ac....
18
votes
4answers
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 ...
4
votes
1answer
63 views

Is there any way to turn Labeled[…] into graphics primitives?

I have asked a similar question before. In that question I pointed out that the following code does not work: ...
1
vote
1answer
1k views

Converting Matlab code to Mathematica [closed]

I have following Matlab code: ...
2
votes
1answer
73 views

Convert RotationMatrix to RotationTransform

Is it possible to convert RotationMatrix to RotationTransform ? I guess it should exist a function to do this Thank you for ...
5
votes
3answers
157 views

Specify set of base units to use in UnitConvert

I am trying to convert arbitrary units to CGS. I know this can get a bit tricky with ESU, but for this question that does not need to be addressed. What I would like to do is to give a quantity-to-...
2
votes
1answer
145 views

Convert ASCII Characters to Mathematica Input Form

I have the following pure ASCII character list: ...
4
votes
1answer
302 views

Integer to ordinal number string (words only)

I am trying to create a function that does: f[1] (* "first" *) f[27] (* "twentyseventh" *) f[50] (* "fiftieth *) There need not be a hyphen or space in ...
13
votes
5answers
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 ...
2
votes
0answers
395 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 ...
13
votes
1answer
4k views

How to convert the Latex format to Mathematica input?

How to convert the Latex format to Mathematica input? For example, if I have a formula: $$ \sum_{m_{i}=0}^M\sum_{n_{j}=0}^N \frac{(z_{i}/2)^{m_{i}}(z_{j}/2)^{n_{j}}}{m!n!} $$ in terms of Latex ...
2
votes
1answer
399 views

Converting built-in Mathematica symbol to C [closed]

I am trying to convert my Mathematica code to C since it can sometimes takes the Mathematica code quite a while to execute since the arrival times lists are hundreds of thousands of counts long, and ...
0
votes
0answers
117 views

How to extract the code from a cdf file? [duplicate]

I have several CDFs, and these bring interactive drawings with functions, how can I extract the code that generates them? I have tried to follow some previous answers but it does not work for me, it ...