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
3 votes
1 answer
153 views

Convert black and white pictures into color images

I have a digital image of an old black and white picture. Is it possible, using Mathematica, to convert this old picture into a black and white image? For example: This transformation was done using ...
Michiel van Mens's user avatar
0 votes
2 answers
98 views

Is there a way to convert a high precision value to its digits?

Is there a way to convert a number like 2.5326384172870370602159219766864657866396178797`20.124930050805514*^-12 to a high precision integer? Mathematica gives me only 20 digits with ...
levitymaster's user avatar
2 votes
1 answer
126 views

Convert R code to Mathematica code of Poisson log-likelihood for the epidemic curve

I want to define a function that simulates the model for a given combination of parameters and calculates the Poisson log-likelihood for the epidemic curve of reported cases: ...
Athanasios Paraskevopoulos's user avatar
1 vote
0 answers
59 views

Byte array to String with no internal processing, e.g. 𓃰

UTF8 defines a way to map from bytes to glyphs. In particular, glyphs with code <128 can be 1 byte, glyphs with code <2048 can be 2 bytes, etc. up to 4 bytes. For instance, the white queen <...
Adam's user avatar
  • 3,897
2 votes
2 answers
56 views

ToPolarCoordinates not working with units

I am trying to convert some quantities with units from rectangular to polar coordinates (to get the magnitude and angle). It seems that ToPolarCoordinates command does not calculate the angle when ...
user90441's user avatar
  • 129
2 votes
1 answer
69 views

Period to comma TexForm conversion

How can we instead of having a period as a decimal seperator have a comma when using a TeXForm conversion in Mathematica? Example: ...
nate's user avatar
  • 21
10 votes
1 answer
347 views

How to convert a Markdown file into a Mathematica notebook

How to convert a Markdown file (or text) into a Mathematica notebook? For example, easy conversion of comprehensive MSE posts is desirable. Possible approaches ordered according to their convenience: ...
Anton Antonov's user avatar
3 votes
1 answer
63 views

Converting ViewPoint and ViewCenter to ViewVector

In the documentation about ViewPoint in the section "Properties & Relations" we can read: "Convert ViewPoint to ViewVector by multiplying the length and pointing the center:" ...
azerbajdzan's user avatar
  • 9,653
2 votes
0 answers
53 views

BoundaryDiscretizeGraphics for exotic unicode glyphs

This code works BoundaryDiscretizeGraphics[Text@"\[WolframLanguageLogoCircle]\[WolframLanguageLogo]", _Text] But for more exotic characters, it produces ...
Adam's user avatar
  • 3,897
9 votes
3 answers
1k 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 ...
Adam's user avatar
  • 3,897
13 votes
1 answer
307 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: ...
yode's user avatar
  • 26.3k
6 votes
1 answer
278 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 ...
Michael E2's user avatar
  • 233k
5 votes
2 answers
223 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 ...
hana's user avatar
  • 2,688
12 votes
2 answers
595 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 ...
a15355447898a's user avatar
5 votes
1 answer
131 views

Modify StandardForm of E

StandardForm of E is \[ExponentialE], can we modify it to something else? I thought I could ...
xzczd's user avatar
  • 63.4k
11 votes
1 answer
317 views

What is idiomatic way to extract NumericArray from Image?

It is easy to see that NumericArray is a construct underlying Image: ...
Alexey Popkov's user avatar
4 votes
2 answers
87 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 ...
Nicholas G's user avatar
  • 1,951
0 votes
0 answers
75 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|. <...
J0ta's user avatar
  • 65
5 votes
2 answers
334 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 ...
Anna Naden's user avatar
1 vote
3 answers
113 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. ...
drorhun's user avatar
  • 113
0 votes
1 answer
47 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 ...
drorhun's user avatar
  • 113
6 votes
1 answer
200 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 ...
yode's user avatar
  • 26.3k
15 votes
1 answer
469 views

Wrong Graphics coordinate system after Image to Graphics conversion

Bug introduced in 12.3 or earlier and persisting through 13.3.1 [CASE:4896512] If I upload this image (originally this img was generated by ...
yode's user avatar
  • 26.3k
1 vote
2 answers
117 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 ...
AlbertLew's user avatar
  • 473
3 votes
1 answer
89 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 ...
alancalvitti's user avatar
  • 15.1k
3 votes
0 answers
79 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-...
Alexey Popkov's user avatar
3 votes
3 answers
224 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 ...
SAC's user avatar
  • 1,335
3 votes
3 answers
160 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: ...
JJ-'s user avatar
  • 31
-1 votes
1 answer
119 views

Conversion code Mathematica 5.0 to Matlab [closed]

How to convert the following Mathematica code into Matlab? What is the corresponding Matlab code? ...
Juan Angel's user avatar
2 votes
1 answer
126 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: ...
mandella's user avatar
  • 133
7 votes
1 answer
731 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: ...
Tschibi's user avatar
  • 857
7 votes
1 answer
191 views

Interpreting traditional math

There are two ways (afaik) to parse traditional math string to an expression: ...
Kuba's user avatar
  • 136k
2 votes
2 answers
158 views

Converting Strings to Reals in a List

I am new to Mathematica and working with streamed data: ...
noob3000's user avatar
2 votes
1 answer
210 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 ...
florin's user avatar
  • 1,592
4 votes
3 answers
284 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....
Vaclav Kotesovec's user avatar
0 votes
2 answers
145 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....
YU MU's user avatar
  • 7
3 votes
1 answer
188 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 ...
Paul B. Slater's 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 ...
Paul B. Slater's user avatar
1 vote
0 answers
292 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 ...
Pxx's user avatar
  • 691
3 votes
3 answers
743 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 $...
Luqman Saleem's user avatar
3 votes
1 answer
73 views

How to generate non interfering SVGs (Cloud embedded)?

The problem Please run this in the Cloud: ...
Kuba's user avatar
  • 136k
3 votes
1 answer
68 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 ...
Kuba's user avatar
  • 136k
6 votes
3 answers
537 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 ...
David G. Stork's user avatar
4 votes
5 answers
2k 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} ...
lio's user avatar
  • 2,356
3 votes
0 answers
96 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 ...
Alexey Popkov's user avatar
2 votes
1 answer
638 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: ...
kile's user avatar
  • 1,651
3 votes
1 answer
157 views

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

Is there a way automatically/programmatically convert an org-mode table ...
George's user avatar
  • 3,115
17 votes
5 answers
811 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 ...
Perfect Fluid's user avatar
4 votes
3 answers
300 views

Converting between XML and JSON?

I can't seem to find a way to convert between an XML string and RawJSON: ...
M.R.'s user avatar
  • 31.2k
2 votes
1 answer
58 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 ...
Gummala Navneeth's user avatar

1
2 3 4 5