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
1
vote
1answer
1k views

Converting Matlab code to Mathematica [closed]

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

ToExpression and RowBox — orderings

With: ToExpression[RowBox[{"c", ToBoxes[Plot[Sin[x], {x, -2, 2}]], "a"}]] I get the three elements of the array, but with "a" and then "c" at the beginning. I ...
2
votes
1answer
851 views

Mathematica to Matlab

my question is a duplicate of : Is it possible to export the equations from Mathematica to MATLAB? I did some symbolic calculations in Mathematica and want to transfer the result to Matlab. The ...
3
votes
1answer
838 views

How to Convert Mathematica Notebooks to PDF's?

My book is done. I'm left with twenty seven (27) Mathematica Notebooks (.nb's) How do I convert these notebooks to the pdf format? How do I combine all twenty seven (27) pdfs into a single pdf? Thanks ...
4
votes
1answer
89 views

Subtracting Missing[] the old way

In previous versions of Mathematica Missing[]- Missing[] would output Missing[]- Missing[]. In the current version is outputs 0. Is there a way to get Mathematica to revert back to the old output? ...
6
votes
1answer
389 views

How to transform general Ellipsoid into rotated axis-oriented one?

Recently, I discovered a long-standing bug in the rendering of Disk and Circle primitives after applying ...
0
votes
1answer
75 views

ToExpression Error when parsing MathML in XML

My code for parsing MathML to be readable in Mathematica: ToExpression @ ImportString @ ExportString[#, "XML"]& /@ Cases[ xml, XMLElement["math", _, _],∞ ] ...
2
votes
1answer
958 views

CMD method to convert .nb file into .m file

.nb file consists of the boxes, and the .m file is a pure text file, what can help to share on GitHub. Of course, we can open a <...
9
votes
4answers
2k views

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

I am a Wolfram Language/Mathematica beginner and trying to convert STEP ISO10303 commands into geometrical regions. A simple command looks like ...
2
votes
2answers
386 views

Want to convert a string to a SHA512 Base64 value

I am having trouble converting this: "333" Into this: "XjFVd0052XxfnhfBCMKz4EhaQ64069GW9hpvi/cy73GknlcQWUz8c5HbEU7fmfXaPtlu8dbKXlmOhfkb1B5+6w==" It is for a web based program (I need to get a ...
1
vote
1answer
152 views

Converting LaTeX expression in Mathematica — strange result

I tried to convert a latex expression in Mathematica, but it shows me a strange result (it shows a strange word: "ghit"). ...
0
votes
0answers
69 views

Combine multiple ParametricPlot3D to export to stl file (w/o using Show[])

I have multiple ParametricPlot3D functions, that I am visualizing together using the Show[] operator. However, I cannot export this as an stl file Some of my functions: ...
6
votes
4answers
291 views

How do I convert an inexact number smaller than $MinMachineNumber to machine-precision?

I was trying to convert some arbitrary-precision numbers to machine-precision numbers using N[myNumber,MachinePrecision]. But, although my test number did lose some ...
6
votes
1answer
183 views

TagBox + InterpretationBox vs ConvertTo/StandardForm

There appears to be a problem with a menu command Convert To / StandardForm (Crtl+Shift+N) with respect to InterpretationBox ...
11
votes
1answer
157 views

TextString evaluation leak

Bug introduced in 10.4 or earlier and persisting through 11.3 [...] I checked and reproduced your issue, and have passed along a report to our developers on the same [...] CASE:3972929 ...
7
votes
2answers
221 views

How to convert a RawArray of bytes to ByteArray?

A ByteArray can be converted to a RawArray: ...
1
vote
2answers
73 views

ImageMesh precision

Browsing though the documentation of ImageMesh I found it lacking with regard to its methods and options concerning mesh generation. In my application I have an ...
6
votes
1answer
183 views

Latex expression \int_{a}^{b} x dx in Mathematica - ToExpression+TexForm error

I tried to convert a Latex expression to Mathematica in this way: ToExpression["\\int_{a}^{b}{x dx}", TeXForm] Mathematica gives me an error. How can I get the ...
7
votes
1answer
134 views

Inconsistent rounding with ToExpression

I am trying to convert a string which contains a decimal number into a number with out any lost of precision. For example the string 5000000.0000000009 should ...
4
votes
1answer
189 views

Convert a Notebook directly to a package with boiler plate

I want to be able to turn a bunch of notebooks I have into packages so I can more easily share them with others, without having to go through the boiler-plate of choosing which cells to export / doing ...
4
votes
1answer
124 views

URLRead ignores content-encoding:gzip header

Background Taking an example from Decoding GZIP encoded Body, BodyBytes (ByteArray) and BodyBytesArray from URLRead: ...
5
votes
1answer
279 views

A bug in converting some Unicode characters into FullForm?

Currently I know only one well-documented way to convert all special characters in an arbitrary string into their FullForm: In ...
3
votes
6answers
225 views

How to convert the Parallelogram into a Polygon

Suppose I have Parallelogram like Parallelogram[{1, 2}, {{3, 4}, {6, 3}}] I can convert it into a ...
3
votes
1answer
177 views

Conversion decimal point to floating point and vice versa

I would like to know if there is any way to convert decimal numbers to floating point, using the IEEE-754 standard, specifying whether it is simple or double. And vice versa, floating point to decimal ...
7
votes
3answers
409 views

How to convert input expression to FullForm String

Is there a way to convert an input expression to FullForm String? Here is my attempt, which is almost there. ...
4
votes
5answers
1k views

How to convert string to real numbers when there are many spaces in them?

I have generated a string list " 1 1 3212 8.0000 75 61 1 74 3 58 0.0000" I want to convert them into real numbers however, when ...
0
votes
0answers
24 views

Function seems to be evaluating before giving it a value [duplicate]

I'm trying to take a list of coordinates and convert the right ascensions and declinations from h min s / deg arcmin arcsec to degrees. This is my list of coordinates ...
4
votes
1answer
108 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*) ...
6
votes
3answers
436 views

Characters to numbers

I have an string "000101". I know that Characters change it to {"0","0","0","1","0","1"}. ...
4
votes
1answer
3k views

Convert radian to degree and add °

How can I convert a radian angle to a degree one and add ° after it? I am using N[(Pi/4)/Degree], but the output is 45. with ...
10
votes
1answer
802 views

How to export strings as pure ASCII?

The "PrintableASCII" characters set consists of 97 characters, including space (\[RawSpace]) and two control characters: the ...
3
votes
2answers
140 views

How to convert span to flat list of indices?

Let sp be a Span object, and n a non-negative integer. I'm looking for an efficient way to ...
0
votes
1answer
126 views

Importing a large number of 2d DICOM images and generating a 3D image from them [closed]

I would like to construct a 3D image from 900 2D images in DICOM format in a folder. I am fairly new to mathematica and would greatly appreciate your help. I am currently using Mathematica 11. I used ...
7
votes
3answers
355 views

Programmatically convert notebook input cells to text file

I have ~150 student-submitted Mathematica notebooks for an assessed assignment. While I've been marking them, I'm suspecting there is a reasonable amount of plagiarism going on, when multiple students ...
5
votes
1answer
264 views

Decoding GZIP encoded Body, BodyBytes (ByteArray) and BodyBytesArray from URLRead

When calling the Stack Exchange API v2.2 using the new (Mma11) function URLRead we get a GZIP encoded Body in alternative formats: ...
4
votes
1answer
660 views

How to edit a downloaded cdf textbook example or prevent someone from editing my notebook?

I have downloaded from https://www.wolfram.com/cdf/uses-examples/textbooks.html the textbook example and I have opened it. I am trying to make some edits but I cannot. I opened the option inspector ...
8
votes
3answers
211 views

Re-encode text file to use Mathematica's character name, like \[Alpha]

How can I re-encode a text file (or string) so that non-ASCII characters will be represented using Mathematica's standard names? For example, if the original contents of the file was ...
14
votes
2answers
231 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 ...
4
votes
2answers
94 views

TextString can not convert general TableForm

Bug introduced in 10 and persisting through 11.1.0 TextString is new in 10.0 According to the Documentation ...
0
votes
0answers
75 views

PARI to Mathematica conversion

I need to use the coefficients T(n,k) in my algorithm and I found a program in PARI Can anybody translate this code to mathematica? ...
6
votes
5answers
2k views

How to get exact Rationalize of a decimal number?

This is on Mathematica 11.1 on Windows 7. I have this value 0.97646105481464028 which I'd like to get exact rational for it. I have thought that every terminating ...
2
votes
0answers
26 views

Caching / extracting SemanticImport* settings. SemanticImportFunction?

Using an example from my recent answer: ...
4
votes
0answers
61 views

Is it possible to access FrontEnd's own conversion rules for boxes?

Before sending its output to the FrontEnd the Kernel converts it into boxes by applying MakeBoxes. But it is not the whole story. FrontEnd not just displays the box ...
4
votes
1answer
407 views

How to convert TeXForm to String via ToExpression without it being evaluated in between?

I looked at similar questions, but could not find an answer. I need to convert Latex that represent pure mathematical expressions generated by Maple to Mathematica. I do not want to actually use ...
5
votes
1answer
783 views

Converting 3D graphics to 2D for better export

I noticed that exporting a Graphics3D object into a vector graphics format, like SVG or PDF, produces a rasterized version of the graphics, while 2D objects are ...
3
votes
1answer
204 views

How to make some RowBox to be string

GeneralUtilities`GetUsages["System`Sin"] I want to get $\color{red}{\textbf{1}}$ plain string,but this function actually will give me some ...
1
vote
0answers
55 views

How to convert `LogTicks[0, 2][[1, 2]]` to a regular number

I want to convert the $10^i$ tick labels generated by LogTicks of the CustomTicks package to regular numbers. The first tick ...
1
vote
1answer
56 views

Convert numerical solution to RealDigits

It can be determined that Solve[Gamma[x] == 2*Sqrt[Pi], x] yields a solution of x as ...
10
votes
2answers
251 views

TeXForm handling of derivative higher than two

When the expression is only up to second derivative, TeXForm works correctly: ode = y''[x] == 0; TeXForm[ode] But when the ...
12
votes
2answers
245 views

How to define Normal for new “data types”

In Mathematica 9 and earlier, one of the points under "Details"/"More Information" section for the function Normal was (this is gone after version 10): I have ...