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
7 votes
3 answers
442 views

Convert four bytes to IEEE 754 float

I have some bytes, say bytes=ByteArray@{189,178,61,188}, read from a file with Import[...,"Byte"]. The big endian ...
user avatar
  • 2,762
12 votes
1 answer
230 views

How to convert the ListVector into PackedArray in FunctionCompile

Cross post here I have a compile function cf to calculate the mean for a ragged list: ...
user avatar
  • 24.5k
0 votes
0 answers
38 views

Problem using using TeXForm with TeXUtilities

I am using https://jkuczm.github.io/MathematicaTeXUtilities/reference/guide/TeXUtilities.html and its tex conversion command https://jkuczm.github.io/MathematicaTeXUtilities/reference/tutorial/...
user avatar
  • 112k
6 votes
1 answer
158 views

Convert interpolating function to a Bezier curve

I've been wondering, is there a way to convert an interpolation into a sequence of BezierCurve objects that form each step in the interpolation? There is an easy ...
user avatar
  • 219k
0 votes
0 answers
23 views

Conversion between Special functions

I want to convert a hypergeometric 2F1 function directly to a Chebyshev T or U function. Is Mathematica able to do the conversion? Theoretically it is possible (2F1 to JacobiP, then to Chebyshev T or ...
user avatar
5 votes
2 answers
217 views

Why does polygon2FilledCurve not work here?

From my previous thread where @Alexey Popkov proposed polygon2FilledCurve to remove the outline when exporting to PDF. Now I'm trying to apply that to this but it ...
user avatar
  • 2,330
12 votes
2 answers
488 views

How to convert Unicode to Chinese

I want "\u5b66\u6821\u73b0\u6709\u5728\u6821\u5b66\u751f25000\u4f59\u4eba\u\ ff0c\u73b0\u5f00\u8bbe30\u4e2a\u672c\u79d1\u4e13\u4e1a" to ...
user avatar
4 votes
1 answer
101 views

Modify StandardForm of E

StandardForm of E is \[ExponentialE], can we modify it to something else? I thought I could ...
user avatar
  • 54.1k
10 votes
1 answer
282 views

What is idiomatic way to extract NumericArray from Image?

It is easy to see that NumericArray is a construct underlying Image: ...
user avatar
4 votes
2 answers
74 views

Format Time Reported by AbsoluteTiming

I am trying to format the timing reported by AbsoluteTiming so that it states the hours minutes and seconds of the result. However, probably because ...
user avatar
  • 1,605
0 votes
0 answers
66 views

Real to IEEE 754 not working for values -1<x<1

I have written a Module that takes a real number and returns the IEEE 754 floating point binary equivalent. It works fine for values above |1|, but I cannot get it to work for inputs less than |1|. <...
user avatar
  • 65
5 votes
2 answers
228 views

Exporting data from a simply generated interpolating function

The question referenced in the link here has a title that matches my question, but the discussion is very complex and does not seem to address my issue. I have solved a partial differential equation ...
user avatar
1 vote
3 answers
97 views

Converting Binary Values to Points [closed]

I searched a lot for this question but couldn't find a similar question. How can I convert my binary values to points. The output of the code I wrote is below, I wrote my expectation also below. ...
user avatar
  • 113
0 votes
0 answers
34 views

How do I get 3 digits binary after calling BaseForm or IntegerDigits [duplicate]

Let's say I have a list called 'solution', I'm converting these numbers into binary form ...
user avatar
  • 113
5 votes
1 answer
150 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 ...
user avatar
  • 24.5k
14 votes
1 answer
349 views

Wrong Graphics coordinate system after Image to Graphics conversion

Bug introduced in 12.3 or earlier and persisting through 13.1.0 [CASE:4896512] If I upload this image (originally this img was generated by ...
user avatar
  • 24.5k
1 vote
2 answers
103 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 ...
user avatar
  • 403
3 votes
1 answer
76 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 ...
user avatar
  • 14.8k
3 votes
0 answers
77 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-...
user avatar
3 votes
3 answers
209 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 ...
user avatar
  • 1,120
3 votes
3 answers
133 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: ...
user avatar
  • 31
-1 votes
1 answer
113 views

Conversion code Mathematica 5.0 to Matlab [closed]

How to convert the following Mathematica code into Matlab? What is the corresponding Matlab code? ...
user avatar
2 votes
1 answer
116 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: ...
user avatar
  • 133
7 votes
1 answer
249 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: ...
user avatar
  • 659
7 votes
1 answer
176 views

Interpreting traditional math

There are two ways (afaik) to parse traditional math string to an expression: ...
user avatar
  • 133k
2 votes
2 answers
124 views

Converting Strings to Reals in a List

I am new to Mathematica and working with streamed data: ...
user avatar
2 votes
1 answer
141 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 ...
user avatar
  • 1,110
4 votes
3 answers
172 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....
user avatar
0 votes
2 answers
93 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....
user avatar
  • 7
3 votes
1 answer
169 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 ...
user avatar
1 vote
1 answer
92 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 ...
user avatar
1 vote
0 answers
146 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 ...
user avatar
  • 641
3 votes
3 answers
541 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 $...
user avatar
3 votes
1 answer
68 views

How to generate non interfering SVGs (Cloud embedded)?

The problem Please run this in the Cloud: ...
user avatar
  • 133k
3 votes
1 answer
56 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 ...
user avatar
  • 133k
6 votes
3 answers
439 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 ...
user avatar
3 votes
5 answers
1k 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} ...
user avatar
  • 2,276
3 votes
0 answers
86 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 ...
user avatar
2 votes
1 answer
337 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: ...
user avatar
  • 1,611
3 votes
1 answer
136 views

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

Is there a way automatically/programmatically convert an org-mode table ...
user avatar
  • 2,975
15 votes
4 answers
526 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 ...
user avatar
4 votes
3 answers
224 views

Converting between XML and JSON?

I can't seem to find a way to convert between an XML string and RawJSON: ...
user avatar
  • 30.5k
2 votes
1 answer
50 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 ...
user avatar
2 votes
1 answer
128 views

ToExpression interpreting typeset strings

Restatement of question, including code. ...
user avatar
9 votes
1 answer
157 views

DateObject granularity conversion

Is there a way to convert the DateObject whose FullForm is: ...
user avatar
  • 3,193
5 votes
2 answers
211 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 ...
user avatar
  • 1,556
2 votes
1 answer
230 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 *) ...
user avatar
9 votes
0 answers
722 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?
user avatar
  • 398
1 vote
1 answer
77 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 ...
user avatar
8 votes
1 answer
381 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 ...
user avatar
  • 112k

1
2 3 4 5