Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
123 votes
7 answers
14k views

Minimal effort method for integrating C++ functions into Mathematica

Update: While at the time of writing the question loading DLLs with .NET/Link seemed easier, now I always use LibraryLink, which I recommend to anyone with a similar problem! As of Mathematica 8, ...
Szabolcs's user avatar
  • 236k
70 votes
7 answers
33k views

How to use Mathematica functions in Python programs?

I'd like to know how can I call Mathematica functions from Python. I appreciate a example, for example, using the Mathematica function Prime. I had search about MathLink but how to use it in Python ...
GarouDan's user avatar
  • 1,536
60 votes
6 answers
12k views

Is there a way to run Python from within Mathematica?

I know there is some support for running Mathematica from Python, but is there any way to do the reverse. For example, to import some Python classes and use them in Mathematica?
orome's user avatar
  • 12.9k
53 votes
4 answers
9k views

Calling MATLAB from Mathematica

How can I call MATLAB functions directly from Mathematica and transfer data/variables between the two systems?
siva82kb's user avatar
  • 631
48 votes
2 answers
6k views

Running Mathematica on Docker

I didn't find any information on the net about running Mathematica math/Wolfram Engine (wolframscript) in a Docker Container. Is ...
Murta's user avatar
  • 26.4k
45 votes
1 answer
3k views

Linking FORTRAN with Librarylink

FORTRAN code can be called using MathLink or .NET/Link (see the link for a worked examples). But as mentioned in a talk by T.Gayley and J.Klein in Wolfram Technology Conference 2011, LibraryLink, ...
unstable's user avatar
  • 1,507
44 votes
1 answer
4k views

Web Browsing Automation with Mathematica

I want to build a bot to automate web browsing, this mean something like: filling forms press "submit" buttons find certain text inside pages and so on... How can I do this with Mathematica? The <...
Francesco's user avatar
  • 571
40 votes
2 answers
8k views

Exchanging numpy arrays between Python and Mathematica?

I've been using np.savetxt(location, result, delimiter=',') in Python followed by Import[location,"CSV"] in Mathematica. Some of ...
Yaroslav Bulatov's user avatar
37 votes
3 answers
5k views

Configuring Mathematica to send email from a notebook

I can't get my email settings set properly such that I can use SendMail[] to email directly from Mathematica. I have opened "Preferences", clicked on the tab "...
Jagra's user avatar
  • 14.6k
34 votes
6 answers
11k views

Cut and paste data from a spreadsheet

I have a set of data points in two columns in a spreadsheet (OpenOffice Calc): I would like to get these into Mathematica in this format: ...
Lucy Brennan's user avatar
33 votes
3 answers
2k views

Calling IronPython code from Mathematica

I'd like to call some IronPython code from Mathematica using .NET/Link. The problem is that the code lives in .py files, yet from Mathematica I can only load .NET assemblies which are DLLs. So it ...
Meh's user avatar
  • 1,637
33 votes
2 answers
2k views

Can anyone explain how to use Mathematica's OAuth package?

I noticed that in HTTPClient.m which is included with Mathematica 9 and is located in ...
Max's user avatar
  • 1,036
32 votes
2 answers
2k views

How can I conveniently call igraph from Mathematica?

Mathematica has lots of functions for working with graphs and networks, but there are still some functionality holes that are provided by other packages. Also, due to the nature of graph theory, ...
Szabolcs's user avatar
  • 236k
32 votes
2 answers
8k views

How to programmatically extract mathematical formulas from Word with Mathematica 9?

I have a bunch of(1000+) Microsoft Word document in .Docx format. How can I programmatically extract the mathematical formulas from MS Word using Mathematica 9? This is what example looks like (or ...
Xiang Li's user avatar
  • 515
26 votes
3 answers
2k views

Calling external commands without showing command prompt on windows

I'm playing around with some code that's calling external command-line commands on a windows platform, and when doing this, the command prompt will pop up quickly and then disappear. This is not a ...
jVincent's user avatar
  • 14.8k
26 votes
1 answer
1k views

How can I use the Python library networkx from Mathematica?

Is there an easy way to access the Python library networkx from Mathematica? The improvements to ExternalEvaluate in Mathematica 12.0 should make this feasible.
Szabolcs's user avatar
  • 236k
26 votes
2 answers
3k views

Executing Maple Code Inside Mathematica

Is it possible to create a C++ program using MathLink that will invoke the Maple kernel and execute a very basic Maple command using OpenMaple? I'm envisioning the following: ...
James Rohal's user avatar
  • 1,426
25 votes
3 answers
2k views

Clipboard with transparency

After reading this question I have determined that Rasterize[Graphics[Circle[]], "Image", Background -> None] allows you to do ...
William's user avatar
  • 7,655
24 votes
2 answers
2k views

How do I call a 32-bit DLL using .NET/Link and a 64-bit version of Mathematica?

The .NET/Link tutorial shows how to call functions defined in DLLs. The example uses the GetTickCount Win32 API function ...
Szabolcs's user avatar
  • 236k
23 votes
1 answer
748 views

Calling Sage functions from Mathematica

I recently found a very useful open-source math software called Sage, which provides many useful functions lacking in Mathematica. Since I'm more used to the Mathematica language instead of the ...
hxiao's user avatar
  • 909
22 votes
2 answers
955 views

Are there any "RLink" like projects, which enable the interaction between R and Mathematica?

I want to borrow the vast amount of packages of R. I know there was one but it is neither sold nor supported anymore. So are there any active open source projects for linking R with Mathematica? Thank ...
Ziyuan's user avatar
  • 1,075
21 votes
2 answers
3k views

How can I deploy DLL files created by a Fortran function and call them from Mathematica

This is my Fortran function, established by Intel visual Fortran 11.1 ...
Guanghui HE's user avatar
21 votes
2 answers
593 views

Is Compress[] compatible between different Mathematica versions?

Compress[] was introduced in version 6 of Mathematica. It gives a compressed version of expressions represented as a string of ASCII characters. It preserves more ...
Szabolcs's user avatar
  • 236k
20 votes
1 answer
2k views

Mathematica Functions from VBA

I'm trying to call Mathematica functions from VBA (Excel) using .NETLink without success. (Yes, I know Mathematica Link for Excel exists. And yes, I know the proper thing to do is buy it. However, it'...
kale's user avatar
  • 11k
20 votes
1 answer
615 views

How to connect to an already running interactive Python session?

As Mathematica has the interoperability with Python since M11.2, with major improvements in M12.0, is it possible to connect to already running interactive Python sessions? For example, can we connect ...
sunt05's user avatar
  • 4,367
19 votes
5 answers
9k views

How can I transfer mathematical expressions between Mathematica and Maple?

Is there a simple way to copy mathematical expressions between Mathematica and Maple (or at least in one direction)? I mean only expressions built from numbers and predefined mathematical functions, ...
Vladimir Reshetnikov's user avatar
19 votes
4 answers
6k views

Write C/C++ programs calling Mathematica functions

I need to write a C/C++ program and call some functions in Mathematica especially those like Solve or NDSolve. The problem is ...
Andry's user avatar
  • 431
19 votes
3 answers
5k views

Transfer graphics from Mathematica to Word without loss of quality

I want some high-quality 2D graphics produced by Mathematica in my paper. My step-by-step operation as follows: First I make the plot, for example, ...
user avatar
17 votes
2 answers
7k views

How to place CDF file in Microsoft Word, Powerpoint or in interactive PDF file?

I would like to create a presentation for my lecture in which I would use Mathematica CDF files. Let's say I want to have such interactive content: ...
Misery's user avatar
  • 2,660
17 votes
1 answer
2k views

Exporting 2D & 3D graphics for use in Adobe Illustrator

I have recently (perhaps since Mathematica Version 10?) encountered a change in how PDF images are saved and how they behave after being loaded into Adobe Illustrator (v16.0.4 under Mac OS X 10.10.5). ...
Joseph O'Rourke's user avatar
17 votes
1 answer
2k views

How to install and configure Intel C++ Compiler for Mathematica correctly?

I wish to try the trial version of the latest Intel C++ Compiler for Windows with Mathematica. I have downloaded the current version of Intel® C++ Composer XE 2011 for Windows and installed only the "...
Alexey Popkov's user avatar
17 votes
1 answer
470 views

Using ImageJ filters directly from Mathematica through J/Link

tl;dr I am looking for a short but complete example that shows how to apply an ImageJ filter to a Mathematica Image through J/Link. Fiji/ImageJ is one of the ...
Szabolcs's user avatar
  • 236k
16 votes
3 answers
3k views

How to make Mathematica graphs in Microsoft Word independent from Mathematica?

When I open a .docx file containing Mathematica graphs on a computer without Mathematica software installed, the graphs look corrupted. For example, ...
kamran's user avatar
  • 515
16 votes
5 answers
2k views

Is there a Mathematica/Lisp link?

I'd like to start learning Lisp as it sometimes leads to interesting answers on this site with concepts borrowed from this language, so I'm curious. As I already spend most of my programming time in ...
faysou's user avatar
  • 11k
16 votes
3 answers
809 views

Why does Mathematica use a different $PATH than terminal?

I am trying to run bash commands from within Mathematica. Funnily enough, Mathematica seems to use a different $PATH environment than the system environment. If I try ...
freddieknets's user avatar
  • 1,085
16 votes
2 answers
428 views

Interfacing Mathematica with MINE using JLink

In last December's Science David N. Reshef, et al. proposed an interesting method to detect associations in data (Detecting Novel Associations in Large Data Sets, Science 334, 1518, 2011). Contrary to ...
Sjoerd C. de Vries's user avatar
16 votes
1 answer
5k views

Step-by-step instruction to Install C Compiler

I remember using C compiler on my previous computers, and I never had any problems installing them. At this time, however, I failed to work through the instructions provided in Mathematica ...
Artem's user avatar
  • 1,037
16 votes
2 answers
1k views

Is it possible to embed the Mathematica editor?

Is it possible to embed a Mathematica window into a .NET application? I mean not just the interop, but actually making the notebook editor window part of a .NET form. Is this possible?
Dmitri Nesteruk's user avatar
16 votes
2 answers
8k views

How do you run Wolfram Language code in VSCode?

I have recently gotten into learning the Wolfram Language with Mathematica, I honestly love Mathematica, but my trial has recently ended, and I do not want to go through the mess of installing Eclipse;...
Greenrock12's user avatar
16 votes
2 answers
383 views

What is the best way to transfer arbitrary-precision reals using WSTP?

I'm developing a Mathematica package, inside of which there is a number-crunching function. It uses a list of arbitrary-precision numbers as input and it takes a lot of time to do its job. So I've ...
ktm's user avatar
  • 539
15 votes
4 answers
2k views

How to trigger UNIX command-line command from Mathematica notebook?

At UNIX command line, one can run ls -la $HOME. How to trigger this from Mathematica notebooks? Run["!ls -la $HOME"] ...
user13253's user avatar
  • 8,674
15 votes
1 answer
938 views

How do I evaluate Mathematica expressions and insert them in a LaTeX file?

I want to make use of Mathematica as the backend to solve some computations used in my LaTeX input file. As I have no knowledge to make it in Mathematica, I used Maxima as explained in the following ...
kiss my armpit's user avatar
15 votes
3 answers
4k views

How to write data from Mathematica to an existing formatted Excel file?

I have a sheet in an Excel file already formatted: different colors, fonts, columns width and cells styles. I want to fill-out values from Mathematica into specific cells of that sheets, or use that ...
jss's user avatar
  • 405
15 votes
1 answer
1k views

Is it possible to use C# LINQ from Mathematica using .NET/Link?

Using Mathematica's .NET/Link (NETLink`) package, is it possible to call out to .NET's LINQ facilities for list manipulation and other operations?
sblom's user avatar
  • 6,483
15 votes
1 answer
767 views

WXF encoder library for C++

WXF is a fully documented binary encoding for Wolfram Language expressions. WRI has already published a Python encoder/decoder for this format. ExternalEvaluate ...
Szabolcs's user avatar
  • 236k
15 votes
1 answer
771 views

Call julia from Mathematica?

How might one go about calling julia from Mathematica? And vice versa? I'm aware of the MathLink.jl package (https://github.com/JuliaInterop/MathLink.jl), which I've installed into julia 1.3.1. I ...
murray's user avatar
  • 12.1k
15 votes
1 answer
2k views

Load a Mathematica Package via .Net code

I'm using C# to pass data to Mathematica and return graphs: ...
WolframFan's user avatar
  • 1,412
14 votes
3 answers
401 views

ForeignFunctionLoad / RawMemoryAllocate and c-struct that includes an array

I have an external c-function I need to call, and I wish to use ForeignFunctionLoad. The c-function, foo, takes as an argument a reference to a struct, for example: ...
Stefan Gillessen's user avatar
14 votes
2 answers
967 views

Randomness test suites that can be invoked from Mathematica

There are several test suites referenced at csrc.nist.gov designed to test a (pseudo-)random byte sequence for randomness, and discover possible skews, correlations, patterns, or other hidden non-...
Vladimir Reshetnikov's user avatar
14 votes
1 answer
1k views

Using a different R version with RLink

I wish to use a different version of R than what is provided by Mathematica 9. For example, I want to use the Macports version of R, where R_HOME is ...
Eric Brown's user avatar
  • 4,436

1
2 3 4 5