Skip to main content
53 votes
Accepted

How to convert the $\LaTeX$ format to Mathematica input?

You can use ToExpression. ToExpression["string", TeXForm, HoldForm] Paste your content inside quotes and click the ...
materia-nigra's user avatar
22 votes

How to extract parts from atomic expressions like DelaunayMesh and Graph?

Motivation Recently, I wanted to extract parts of an atomic expression, and my first thought was to use a ToExpression/ToString ...
Carl Woll's user avatar
  • 131k
18 votes
Accepted

Display grayscale image as 3d plot

pic = Import @ "https://i.sstatic.net/RJs60.png" ListPlot3D can work with an array of values too. The problem is that you have ...
Kuba's user avatar
  • 137k
18 votes
Accepted

Wrong Graphics coordinate system after Image to Graphics conversion

I reproduce the issue with version 13.0.0 on Windows 10 x64. Apparently, the issue arises due to a non-default value of ImageResolution option of ...
Alexey Popkov's user avatar
17 votes

Why doesn't Normal[] work on GeometricTransformation?

A bug report has been generated on this issue, but I don't believe any resources are being expended on it at the present time (note that the more user reports are received on an issue, the more likely ...
Carl Woll's user avatar
  • 131k
16 votes
Accepted

Is it possible to change/customize some conversions done by TeXForm?

You could use my TeXUtilities package: ...
jkuczm's user avatar
  • 15.1k
16 votes

How to convert the ListVector into PackedArray in FunctionCompile

Edit Regarding the direct question in OP, i.e. how to flatten a "ragged" array inside FunctionCompile, I have to say there might be ready-to-use method ...
Silvia's user avatar
  • 27.6k
16 votes
Accepted

Convert four bytes to IEEE 754 float

...
eyorble's user avatar
  • 9,498
15 votes
Accepted

How to use an image as a number?

To minimize confusion I've reduced the code to one approach. ...
Kuba's user avatar
  • 137k
15 votes
Accepted

How to convert this term to a Hypergeometric function?

For your first question, if we gather the factors into a single variable z, there's a simple hypergeometric function: ...
Roman's user avatar
  • 48.7k
13 votes

Create Array from list of indices/values

spec = {{{0, 0}, a}, {{0, 1}, b}, {{1, 0}, c}, {{1, 1}, d}}; Normal @ SparseArray[# + 1 -> #2 & @@@ spec] {{a, b}, {c, d}}
Kuba's user avatar
  • 137k
13 votes
Accepted

How to convert Unicode to Chinese

The rule of replacing can be: StringReplace["\\u"~~s:Repeated[HexadecimalCharacter,{4}]:>FromCharacterCode@FromDigits[s,16]] BTW, if you are handling ...
rnotlnglgq's user avatar
  • 3,740
12 votes

How to convert a string having nested parentheses into an expression?

I'd do the minimum necessary to make a legitimate, unambiguous Mathematica expression, and then let Mathematica rewrite it. ...
John Doty's user avatar
  • 13.8k
12 votes
Accepted

How to convert dayname to number?

The most efficient way is not to use DayName but this: DateValue[{2012, 12, 24}, "ISOWeekDay"] Regarding Robert's comment ...
halirutan's user avatar
  • 113k
12 votes
Accepted

DateObject granularity conversion

DateObject itself can be used for this: date1 // FullForm ...
C. E.'s user avatar
  • 70.9k
11 votes
Accepted

Can Mathematica convert a RegularExpression into a StringExpression or vice-versa?

The conclusion of Mr. Wizard's and MarcoB's comments is that there is no function to convert regular expressions into string patterns, but there is a function to convert string patterns into regular ...
11 votes

How do you import "ISODateTime" and capture the time zone?

Just got hit by this 'issue', don't feel competent enough but it looks like something that should be reported. So in case you know you will get UTC time (like it is in my case, this is very common ...
Kuba's user avatar
  • 137k
11 votes
Accepted

Convert radian to degree and add °

I resolved that using (Pi/4) * (180 Degree /Pi) Degree is a symbol similar to Pi, it ...
Ale1794's user avatar
  • 525
11 votes

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

Try StringRiffle[{0, 0, 1, 2, 3, 4}, ""] "001234" Introduced in version 10.1 or in postfix as follows: ...
Hans's user avatar
  • 956
11 votes

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

While StringRiffle is nice and concise, but it has -- similar to many of the String-related tools in Mathematica -- severe ...
Henrik Schumacher's user avatar
11 votes
Accepted

What is idiomatic way to extract NumericArray from Image?

I think this is the most idiomatic way to get the image data as a numeric array: ...
Jason B.'s user avatar
  • 69.2k
10 votes

Understanding evaluation and typesetting

Question 1: What is the typesetting in Mathematica? What procedures does it include? I think that this 2008 year MathGroup post by John Fultz completely answers this question, so I'll cite it here:...
Alexey Popkov's user avatar
10 votes
Accepted

How to get exact Rationalize of a decimal number?

You can use SetPrecision to find a more precise result. ...
Karsten7's user avatar
  • 27.5k
10 votes
Accepted

How to convert input expression to FullForm String

You just put Unevaluated in the wrong spot: ...
Carl Woll's user avatar
  • 131k
10 votes

Is it possible to change/customize some conversions done by TeXForm?

I will assume that you want the normal TraditionalForm typesetting in a notebook to be unaffected, and only want to see the ...
Carl Woll's user avatar
  • 131k
10 votes
Accepted

TeXForm doesn't work in wolframscript?

I didn't check how formatting works in wolframscript but if you force it on your terms then it does not matter: TL;DR: use: $ wolframscript -cloud -code 'ToString @ TeXForm[ (d u)/(d t)]'
Kuba's user avatar
  • 137k
10 votes

How to convert this term to a Hypergeometric function?

Match up power series and solve for parameters for Hypergeometric2F1[a, b, c, d x]: ...
Michael E2's user avatar
  • 239k
10 votes
Accepted

Convert Wolfram code into C language

Mathematica does not currently have any facilities to expose complex symbolic functionality, such as Solve, to C. To be precise, this is not possible without having ...
Szabolcs's user avatar
  • 236k
10 votes

How to convert a Markdown file into a Mathematica notebook

Here is a stand-alone Command Line Interface (CLI) app implemented in Raku : "Markdown::Grammar". See the video "Markdown to Mathematica converter (CLI and StackExchange examples)" ...
Anton Antonov's user avatar
9 votes

How to convert Graphics3D object into an Image3D object?

You could create a region using DiscretizeGraphics and find points within a certain distance of the surface using RegionDistance ...
Simon Woods's user avatar
  • 85.1k

Only top scored, non community-wiki answers of a minimum length are eligible