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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
8 votes
1 answer
982 views

Using the variable in the MATLAB workspace using MATLink or any other packages

I have a program in MATLAB and after I run the program, I get some results in MATLAB's workspace. Now, I need to use these results in Mathematica. What I currently do is that I save the workspace as a ...
secluded's user avatar
  • 135
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
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
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
11 votes
1 answer
3k views

Using Mathlink with the cernlib FORTRAN package MINUIT

I could successfully use Mathlink to call a simple fortran subroutine. However, when I went to a realistic problem, I failed. To be specific, I want to fit a set of data with some function using the ...
unstable's user avatar
  • 1,507
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 ...
WangFei's user avatar
  • 95
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
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
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
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
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
12 votes
1 answer
492 views

Using non-trivial objects in RLink

I would like to use RLink to access igraph, which has an R interface. I do not know R; my motivation for learning it is to be able to access igraph easily. I installed igraph using ...
Szabolcs's user avatar
  • 236k
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 ...
Ivan's user avatar
  • 2,237
9 votes
1 answer
586 views

How to call external commands with parameters on Win7?

I'm trying to use the Win7 command prompt from a Mathematica notebook. I'd like to do a couple simple things, but I can't seem to get the syntax straight: open explorer.exe in a specific location ...
dionys's user avatar
  • 4,341
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
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
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
13 votes
1 answer
835 views

RLink and R v3.0.1?

Running InstallR["RHomeLocation" -> "C:\\Program Files\\R\\R-3.0.1"] results in a popup box titled "Version Mismatch" saying Error: R.DLL version does not ...
Philip Maymin's user avatar
12 votes
3 answers
2k views

Exporting data from Excel into Mathematica using clipboard

I know that it's possible to import Excel data into Mathematica using the Import command, as we can see in this post. But sometimes I need just to do some fast ...
Murta's user avatar
  • 26.4k
11 votes
2 answers
623 views

How to copy formatted numbers as MathML without quotation marks?

I have the following code: a = 6.08717*10^6; b = a/3; c = a*1.5; d = a^2; matrix={{a, b, c, d},{b, c, d, a},{c, d, a, b},{d, a, b, c}}; matrix // EngineeringForm ...
LCarvalho's user avatar
  • 9,273
9 votes
1 answer
397 views

Launch Front End from .NET MathKernel and return result to .NET

Is it possible to launch a front end and open a notebook from a .NETLink kernel and return a result from the notebook to .NET? In the code below "x" appears in the .NET textbox after 10 seconds but ...
Chris Degnen's user avatar
  • 31.3k
9 votes
1 answer
505 views

How can I wrap a C++ object in WSTP?

I am trying to wrap a sophisticated C/C++ API in Mathematica using WSTP, but can't work out how to return a pointer to a C/C++ data structure. This object was created on the C/C++ side of the wrapper, ...
kuperov's user avatar
  • 126
8 votes
1 answer
873 views

Setting default Mathematica version

Is there a way to set the default Mathematica version? I would like to run both versions 7 and 8 (on a Win7 PC), but when version 8 is installed it takes priority. Clicking on a notebook ...
Chris Degnen's user avatar
  • 31.3k
8 votes
1 answer
318 views

How can multiple null terminated strings be handled in a DLL-function result?

I am trying to connect a classic System Dynamics tool (Vensim DSS) with Mathematica using a DLL that is included in Vensim DSS. Reading though the instructions on how to define DLL functions on how to ...
gwr's user avatar
  • 13.6k
7 votes
2 answers
793 views

Mathematica-exported PDFs placed in Illustrator documents keep disappearing

This question is regarding interoperability between Adobe Illustrator and Mathematica. Illustrator has a File → Place... function which can insert complete figures inside Illustrator documents. "...
Szabolcs's user avatar
  • 236k
7 votes
1 answer
4k views

What´s the best way to COPY/PASTE Mathematica code into Word?

As you can see in the image the code, with a standard copy/paste you obtain squares instead of "Return=New Line". What´s the best way to copy and paste Mathematica code into Word? One choice is a ...
Mika Ike's user avatar
  • 3,261
7 votes
3 answers
1k views

Running PowerShell commands in Mathematica

I'm trying to execute a PowerShell command using Mathematica. Someone has made it before? I tested my command direct in PowerShell, and it worked nice, but no idea on how can I make Mathematica to ...
Murta's user avatar
  • 26.4k
6 votes
2 answers
424 views

Linux’s Bash shell in Windows 10 and mathematica

As we know, Linux’s Bash shell is coming to Windows 10. Now, I want to know, how to using Run[] command or other commands to run some commands like gfortran installed in Linux of Win10 ? And, is it ...
Orders's user avatar
  • 1,247
5 votes
1 answer
144 views

Setting output width for CopyToClipboard

Suppose I have a long string and I copy it to the clipboard: ...
JimB's user avatar
  • 42.9k
3 votes
2 answers
768 views

Interact with external program

I'm using NMinimize with Mathematica 7 using an external Fortran program to get the target value to minimize. I'm doing it using RunThrough with the variables as ...
siritinga's user avatar
  • 253
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
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
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