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
0
votes
0answers
61 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
241 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
162 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
155 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 ...
6
votes
2answers
191 views

How to convert a RawArray of bytes to ByteArray?

A ByteArray can be converted to a RawArray: ...
1
vote
2answers
64 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
176 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 ...
6
votes
1answer
114 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
158 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
115 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
231 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
207 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
133 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
376 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 ...
3
votes
1answer
92 views

MakeExpression can't deal with FE boxes riffled with whitespaces

Bug introduced in 10.4 or earlier and persisting through 11.3 CASE:3910218 When you input { 1 , 2 } (*spaces intended, retype them if you want to copy this*) ...
6
votes
3answers
389 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
2k 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
649 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
121 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 ...
-1
votes
1answer
106 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 ...
6
votes
3answers
298 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
190 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
558 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
192 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 ...
9
votes
2answers
176 views

How do you import “ISODateTime” and capture the time zone?

Bug introduced in V10.4 or earlier and persisting through 11.3 (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
91 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
59 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
1k 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 ...
21
votes
1answer
545 views

Why Except is so slow as compared to equivalent RegularExpression?

When comparing performance of the solutions suggested for this question I discovered that StringExpression involving Except is ...
2
votes
0answers
23 views

Caching / extracting SemanticImport* settings. SemanticImportFunction?

Using an example from my recent answer: ...
4
votes
0answers
58 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
311 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
690 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 ...
2
votes
1answer
184 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
54 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
241 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
241 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 ...
4
votes
0answers
136 views

Boxes in EPS output after PDF -> EPS conversion in Mathematica 11

When I used Mathematica 9, I used to Export to .eps using a .pdf Export, followed by import like the following: ...
12
votes
1answer
3k views

How to convert the Latex format to Mathematica input?

How to convert the Latex format to Mathematica input? For example, if I have a formula: $$ \sum_{m_{i}=0}^M\sum_{n_{j}=0}^N \frac{(z_{i}/2)^{m_{i}}(z_{j}/2)^{n_{j}}}{m!n!} $$ in terms of Latex ...
4
votes
1answer
270 views

Integer to ordinal number string (words only)

I am trying to create a function that does: f[1] (* "first" *) f[27] (* "twentyseventh" *) f[50] (* "fiftieth *) There need not be a hyphen or space in ...
2
votes
3answers
223 views

How to convert numbers to currency values?

I am trying to create a way to convert some values of numbers into currency (dollars). The example I display below takes in three random numbers between -4 and 4, and rounds them to the second decimal ...
4
votes
1answer
267 views

Conversion between Piecewise[] and Abs[] representations [duplicate]

Is there a utility in Mathematica that can convert between two representations of an expression? The simplest example I can think of is Abs[x] Which I'd like to ...
2
votes
0answers
59 views

Is there a substitute for the “Show” function to use within the Mathematica kernel?

I needed to implement a function to convert an object from Graphics3D to Image3D, basically a 3D version of rasterisation (I need the geometry in a discretised form). I used the method suggested by R....
3
votes
1answer
154 views

How to restore a Notebook saved as Package?

A Notebook I was working on was saved as "Package" (with the extension ".m"). Upon opening this file, everything is unreadable. How do I convert this file back to ...
2
votes
1answer
484 views

Circle to Hexagon Conversion [closed]

I have a set of circles defined by a Middlepoint and a radius e.g. Circle1: x = 10, y = 10, r = 3 Circle2: x = 15, y = 2, r = 10 etc... But I want to have them ...
9
votes
1answer
736 views

How to use an image as a number?

How to define an image as a number? for instance I want to do something like this where but there is an error massage ...
15
votes
3answers
1k views

Display grayscale image as 3d plot

How to build 3d plot of grayscale image where x,y - pixel coordinates, z - pixel intensity? I tried ListPlot3D[ImageData[image]], but ...