All Questions
Tagged with interop or interoperability
244 questions
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, ...
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 ...
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:
...
2
votes
0
answers
89
views
A question about using .dll in Mathematica with LibraryFunctionLoad
I am trying to use a custom trilinear interpolation written in C in Mathematica (Windows).
This is the code I start with:
...
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 ...
5
votes
0
answers
105
views
Are ForeignFunction and its friends the next generation of LibraryLink?
It's a bit surprising to me that no one asks about this so far, so let me step up :) .
In version 13.3, an EXPERIMENTAL Foreign Function Interface has been introduced. I'm by no means a C expert, but ...
4
votes
1
answer
113
views
How to use a personal function in Matlab within Mathematica utilizing Matlink?
Problem description
I've written a function in Matlab as follows:
function z = testfuncadd(x,y)
z = x + y;
end
I want to use this function within Mathematica ...
1
vote
0
answers
44
views
Why my MATLink must execute the command `OpenMATLAB[]` twice to realize once normal `OpenMATLAB[]` command?
Problem description
To use Matlab code in Mathematica I have tried to use the package MATLink. However, everytime I run the code below
...
2
votes
0
answers
142
views
How to set up the Gurobi optimizer?
How do I set up Mathematica to use the commercial Gurobi optimizer? Mathematica should be able to use it, as the Method -> "Gurobi" option exists for ...
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;...
10
votes
1
answer
444
views
Can one create a custom front-end for Mathematica?
I'd like to create my custom front-end for Mathematica. I know there's a console interface (launched as math), which mostly works great, but it can't really provide ...
2
votes
1
answer
77
views
Control metadata of CopyToClipboard
Question
The system clipboard can contain image data and text data (and a plethora of other types). Mathematica copies different expressions as different types of data; copy ...
1
vote
1
answer
138
views
Is there any Mathematica API for Z3?
Z3 has bindings for various programming languages, e.g., C, C++, Java, Python, and so on. Are there any for Mathematica? Or how to implement one?
3
votes
1
answer
71
views
What crops the response from the SocketListen based web server?
I noticed that when the response length passes around 1k characters then it is cut at weird lengths: 424, 936 or 1448 characters.
Response is generated correctly but then it is cut so if the body was ...
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
...
1
vote
0
answers
76
views
Repeated calling of Mathematica function from R through system call make it extremely slow
I have the following simple function in test.wls file
x = ToExpression[$ScriptCommandLine[[2]]]
y = ToExpression[$ScriptCommandLine[[3]]]
z = x+y
Print[z]
I call ...
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 ...
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, ...
7
votes
2
answers
673
views
Getting data into Julia session?
Mathematica has a way of integrating with Julia, and automatically convert Julia outputs into Mathematica objects (Julia seems to have nice support for low-rank approximation). What is the best way to ...
1
vote
0
answers
344
views
Can OGDF (a self-contained C++ library for graph algorithms) be integrated into Mathematica?
I would like to begin by congratulating IGraphM on the release of its current update (M 0.6.1). This package makes graph calculations on Mathematica much smoother.
The specifics are available at the ...
1
vote
0
answers
87
views
Copying Bitmaps in 13.1.0.0
I have just installed 13.1.0.0 and have been copying bitmaps (ListLinePlot) from notebooks (Edit->CopyAs->Bitmap) into various MS applications in Windows 10. ...
6
votes
1
answer
274
views
Make Mathematica input things on a website and take the data out
So I found a website that calculates polynomials that I need it intakes a word of a's and b's say aabba and outputs a polynomial. Here is the website: http://www.math.stonybrook.edu/~moira/NewApps/...
0
votes
1
answer
244
views
How to copy Mathematica code into Microsoft Word?
Is there a way to copy my mathematica code (with preserved formatting) as text into microsoft word? Below is part of my code.
...
0
votes
0
answers
64
views
Using and executing the missing complex functions of Mathematica in Wolfram script *.wls
I have the following Mathematica notebook on this link notebook
I was told that the binary wolframscript couldn't understand some complex functions of Mathematica.
First, I would you like to convert ...
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
...
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:
...
7
votes
0
answers
254
views
How To Install R Packages Via R Link In Windows
So it looks like I got RLink working on my Windows machine:
...
4
votes
1
answer
134
views
Change DataStructure (or maybe just a symbol) from JLink/Java program
I try to use JLink and Java program for receiving responses from the abstract WebSocket server. WSS not supported by Wolfram Language now, but I can use this java project + JLink for the creating a ...
11
votes
1
answer
679
views
Mathematica and Google Drive backup client
My Mathematica notebooks (as well as all other files I author in my research) are in a directory that is managed by the Google Drive client. This automatically backs up everything I create and I don't ...
0
votes
1
answer
159
views
How to make the words in pictures from Mathematica into MS Word can be edited?
I find that when I export graphics to PDF format from Mathematica, the words in pictures can be copied. However, when I save the pictures from Mathematica and then insert those pictures into MS Word, ...
10
votes
3
answers
2k
views
Web scraping and multi-threading in Mathematica
I'm working in some web scraping using Mathematica, and today, to speed-up the process, I used bash commands (xargs with parallel options with curl and wget) using ...
5
votes
1
answer
173
views
Is it possible to run Linux utils from Mathematica using Windows Subsystem for Linux?
I have Windows 10 Professional x64 with WSL2 installed. I've also installed Ubuntu 20.04 LTS from Microsoft Store.
I can type ubuntu2004 in the CMD and get access ...
3
votes
3
answers
2k
views
Read sympy expression in .txt file as Mathematica input
I have a Python file that has a variable defined using sympy. For instance, let us take the following (crazy) example that I could have eventually since I am automatizing a routine:
...
5
votes
2
answers
203
views
Image format change when doing direct Cut/Paste
I usually produce graphics with Mathematica and then use Keynote (I am on a Mac running the latest Big Sur OS) for post processing. Until version 12.0.0.0 I would directly highlight the graphics in ...
9
votes
1
answer
730
views
Reusing PARDISO symbolic factorization
Is there a way to do this natively in Mathematica? I read in several places that this is possible with LibraryLink, but I don't have a lot of experience with C and so I'm having trouble implementing ...
11
votes
1
answer
1k
views
3D rigid body physics engine
Is there a package in Mathematica that will allow me to simulate collisions of 3d rigid bodies?
If not, what known libraries could I use and how?
For example, one problem I want to simulate is a ...
12
votes
2
answers
1k
views
Reading data from Google Docs
I am working on a personal project involving a CloudDeploy[ ] that reads data off a Google Doc and then works with it. Ideally, the Google Doc is either a text document or a spreadsheet which contains ...
2
votes
1
answer
125
views
interact with web pages with many hyperlinks and search for a specific name or phrase How?
I have this code that shows many hyperlinks
links = Import[
"http://www.liceobrainstorm.cl/wp-content/uploads/2020/07/",
"Hyperlinks"]
...
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).
...
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:
...
5
votes
2
answers
1k
views
How can I insert an EPS file exported from RegionPlot into MS Word?
I generate a figure using RegionPlot and then Export it as "EPS". When I insert this picture ...
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 ...
4
votes
0
answers
99
views
Socket not ready but data is available
Background
I am playing with https://github.com/arnoudbuzing/wolfram-server and I faced problems with requests that are slightly longer. I tried to narrow it down here.
Problem
This could be my ...
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 ...
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 ...
2
votes
1
answer
206
views
Calling Julia via `ExternalEvaluate`
I am trying to call Julia from Mathematica via ExternalEvaluate, as per this documentation page. I have Julia installed with all the required packages (...
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 "...
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,
...
2
votes
3
answers
1k
views
How to use Mathematica from Python
I've been using the following lines of code to generate 3D geometry (ref).
The inputs edges, vd, ...
1
vote
0
answers
360
views
WolframKernel not found when running WolframScript
While attempting to run wolframscript in linux, I get the error
"WolframKernel not found. Use -configure to set WOLFRAMSCRIPT_KERNELPATH Or export WolframKernel=/yourpath/WolframKernel"
I am ...