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
5
votes
1answer
127 views

How to recover these TemplateBox into normal form?

I often use $\TeX$ editor by Insert→Inline TeX Input in PlotLabel to label graphics: I will get a well-formed plot label: But when I Copy As Input Text and paste ...
14
votes
1answer
302 views

Wrong Graphics coordinate system after Image to Graphics conversion

Bug persisting through 13.0.0 [CASE:4896512] If I upload this image (originally this img was generated by EdgeDetect) by normal ...
1
vote
2answers
93 views

How can I convert dot product into Latex code without dot?

Recently I need to convert a lot of expressions containing dot products into Latex code. To my annoyance, the mathematica system will always leave literal dots (".") in the latex code, but ...
3
votes
1answer
74 views

Normal not working with Translate and some Graphics object [duplicate]

in v13, Normal doesn't seem to work with Translate and some Graphics objects like Rectangle ...
3
votes
0answers
76 views

How to convert Graph atomic object back into unevaluated expression? [duplicate]

For the purposes of further development of my shortInputForm function, I wish to convert Atomic objects such as Graph into non-...
3
votes
3answers
197 views

How to obtain a 3D matrix from Graphics3D?

I have a capillary system and I want to convert this into a numeric matrix. My aim is to create a matrix with NxNxN dimensions of 1's and 0's where the 0's represent the capillary and the 1's ...
3
votes
3answers
118 views

Exporting CSVs of UTM coordinates. How to stop northing exporting in scientific notation?

I need to batch convert a folder of CSVs containing UTM coordinates from GDA94 to GDA2020. Sample data below: Copyable form: ...
-1
votes
1answer
109 views

Conversion code Mathematica 5.0 to Matlab [closed]

How to convert the following Mathematica code into Matlab? What is the corresponding Matlab code? ...
2
votes
2answers
156 views

Convert image of roads to 3D graphics

I have images like this: and I want to convert those lines to 3D graphics so I can export it as OBJ or STL. My best attempt has been by using MorphologicalGraph (following this post) and doing: ...
2
votes
1answer
115 views

Python to Mathematica code bug

I have an assignment in Mathematica, which I've already solved using Python and it's a bit hard to convert the code. Here's what I have done so far: ...
6
votes
1answer
107 views

Convert ByteArray to integer and real values

during the import of a complex file format I handle ByteArray or lists of byte values. While I can easy transform them from one type to each other: ...
7
votes
1answer
170 views

Interpreting traditional math

There are two ways (afaik) to parse traditional math string to an expression: ...
0
votes
0answers
71 views

Can Mathematica convert a picture with formula to latex?

Is there such a package or codes that can convert the formula in the picture into LATEX code? Just like Mathpix
2
votes
2answers
115 views

Converting Strings to Reals in a List

I am new to Mathematica and working with streamed data: ...
2
votes
1answer
121 views

Is it possible to convert a matrix in $\LaTeX$ format to Mathematica input? [duplicate]

Is it possible to do this already in version 11.3? For example, I want to draw a graph ...
4
votes
3answers
148 views

How to convert a real number to a string only in the original length?

Example: I have this number num = 2.9525730420542016*10^1798 (* 2.952573042054202*10^1798 *) If I want to convert it to a string, I don't get "2....
0
votes
2answers
81 views

Convert GiNaC harmonic polylogarithms to HPL packages' notation in Mathematica

A general output from GiNaC (https://www.ginac.de/) of harmonic polylogarithms is H(a,b,c...,x). We want to convert it to Mathematica format (https://www.physik....
2
votes
1answer
152 views

How do I suppress an automatic sign change? II

Let me be try to be highly specific, as my previous attempt How do I suppress an automatic sign change? to pose the question initially had a sign error, and perhaps became a little muddled. In the ...
1
vote
1answer
90 views

How do I suppress an automatic sign change?

In a comment on the answer of user JimB to Evaluate a certain three-dimensional constrained integral , I remarked "I have a integration limit transformation rule of the form ...
1
vote
0answers
98 views

How can I convert a list of rules into a list of equations? [closed]

How can I convert a list of solutions to a list of equations? For example, say I have: sol = {{a->1},{b->2}} and I would like to change it to ...
3
votes
3answers
452 views

Changing value of specific element in an array. (Converting code from MATLAB to Mathematica)

Can we change the value of a specific element of an array in Mathematica? Basically, I have the following given MATLAB script which writes a big 3N-by-3N matrix $h$ by combining two 3-by-3 matrices $...
3
votes
1answer
64 views

How to generate non interfering SVGs (Cloud embedded)?

The problem Please run this in the Cloud: ...
3
votes
1answer
54 views

How to exclude annotation encoding='Mathematica' from generated MathML?

I do not see how to remove <annotation encoding='Mathematica' from generated MathML. Afaict it is not needed for a one way conversion and it often doubles the ...
6
votes
3answers
419 views

Convert Fortran-like number form to traditional number form

What is the most elegant way to convert arbitrary numbers written as (verbatim): 1.13903 e - 08 into traditional Mathematica number form without having to ...
3
votes
5answers
814 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
83 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 ...
2
votes
1answer
254 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
117 views

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

Is there a way automatically/programmatically convert an org-mode table ...
15
votes
4answers
460 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 ...
4
votes
3answers
209 views

Converting between XML and JSON?

I can't seem to find a way to convert between an XML string and RawJSON: ...
1
vote
1answer
43 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
126 views

ToExpression interpreting typeset strings

Restatement of question, including code. ...
8
votes
1answer
136 views

DateObject granularity conversion

Is there a way to convert the DateObject whose FullForm is: ...
5
votes
2answers
192 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 ...
2
votes
1answer
221 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 *) ...
9
votes
0answers
625 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?
1
vote
1answer
68 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 ...
8
votes
1answer
343 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 ...
5
votes
3answers
290 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 ...
9
votes
4answers
360 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
474 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 ...
6
votes
1answer
168 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 ...
4
votes
0answers
84 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
595 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
144 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
111 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....
6
votes
3answers
302 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-...
4
votes
1answer
91 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
422 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 ...

1
2 3 4 5