For questions on interfacing or getting Mathematica to work together with other software or technologies.

learn more… | top users | synonyms (1)

55
votes
5answers
3k views

Minimal effort method for integrating C++ functions into Mathematica

As of Mathematica 8, what is the minimal effort way to integrate an existing C++ function into Mathematica? I think we have these: MathLink (it was quite long ago I used it last time) communication ...
33
votes
3answers
3k views

Calling MATLAB from Mathematica

How can I call MATLAB functions directly from Mathematica and transfer data/variables between the two systems?
25
votes
4answers
6k 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 ...
25
votes
1answer
869 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, ...
22
votes
3answers
973 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 ...
22
votes
2answers
780 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 ...
22
votes
1answer
710 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 ...
21
votes
2answers
1k 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 ...
20
votes
3answers
807 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 ...
19
votes
4answers
802 views

ReadList problem related to Record type

A simple file reading issue is baffling me here. I am reading a around 200 MB textual file in .dat format. Now the file contains many lines but to phrase my problem ...
17
votes
2answers
384 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 ...
15
votes
2answers
641 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?
14
votes
1answer
652 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?
14
votes
1answer
687 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: ...
13
votes
4answers
1k 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 ...
13
votes
2answers
310 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 ...
13
votes
1answer
707 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 ...
13
votes
1answer
345 views

How do I stop my joystick from rotating a 3D graphic?

I am trying to use Mathematica to illustrate mixed strategies in Game Theory. I want my students to be able to use common joysticks as controllers. What I find, however, is that in addition to doing ...
12
votes
4answers
469 views

How do you get a list of filenames from a URL?

How would I get a list of filenames available at a URL? For example, list the files at: http://www1.ncdc.noaa.gov/pub/data/cmb/drought/weekly-palmers/2005/
12
votes
1answer
1k 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 ...
12
votes
1answer
904 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 ...
12
votes
1answer
229 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 ...
11
votes
3answers
707 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, ...
11
votes
1answer
287 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 ...
11
votes
1answer
1k 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 ...
11
votes
1answer
302 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 ...
11
votes
1answer
376 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 ...
10
votes
2answers
413 views

How can I connect Mathematica to Clojure?

I'm using Clojure and I'd really love to be able to use some of Mathematica's functions inside it. Can anyone help with mathlinking it?
10
votes
1answer
476 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, ...
10
votes
1answer
675 views

Load a Mathematica Package via .Net code

I'm using C# to pass data to Mathematica and return graphs: ...
9
votes
1answer
229 views

Wikipedia People only search

I am trying to search people from Wikipedia(For example .*John.* in REGEX). The following query is close, but it isn't generalized like ...
9
votes
1answer
482 views

Can you call a C function that takes function pointers as arguments?

I want to use MathLink to call a function I wrote in C. However, similar to an integrator, it takes a function pointer as an argument and applies it on numbers depending on the other arguments. I ...
9
votes
2answers
345 views

MathLink and C++ vector container

The Problem. I have a C++ class that does some computations, and returns a C++ vector object (the length of which can possibly vary with each run). I want to store each of these vectors as a list in ...
9
votes
1answer
211 views

Link ITK with Mathematica

I would like to know if someone has tried to link Mathematica with ITK code (call ITK code in Mathematica)?
8
votes
1answer
414 views

CDF and MediaWiki

Recently there was a handful of CDF embedding-related topics. However I would like to ask whether anyone has succeeded in embedding CDF into MediaWiki page? I've attempted to do so with the Widget ...
8
votes
1answer
168 views

How to embed “Share content” button into a CDF?

I want to have a button present in a CDF that, when pressed, shares some content material e.g. via Facebook. Is it possible or would the restrictions of the CDF format prevent anything from happening? ...
8
votes
1answer
1k 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 ...
8
votes
1answer
417 views

Mathematica File Organization

Last year I asked how to integrate notebooks to the documentation center in stackoverflow. Back then I was only interested in seeing those notebook and being able to search for them. Unfortunately, it ...
7
votes
2answers
660 views

Mathematica Library Link : How to use non standard 'mint' e.g. 'unsigned int' or 'long long int'

I use Mathematica 8.0.4 on Mac OSX 64 bit, and gcc as C compiler. I am trying to write a LibraryLink function that deals with large positive integers i.e. greater than $2^{31}-1$. By dealing with, I ...
7
votes
1answer
269 views

WinBUGS Interface

Has anyone created on WinBUGS (Bayesian inference Using Gibbs Sampling) interface with Mathematica similar to BugsXLA for Excel? I'd like to setup the model, define the evidence in a notebook and then ...
6
votes
2answers
219 views

Using Read for calling external command does not release file handle

The standard and robust method for piping to/from external commands under Windows is to create a temporary file, save the input into it, pipe it to the command and save its output to a second file. ...
6
votes
2answers
506 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 ...
6
votes
1answer
232 views
6
votes
2answers
1k 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?
6
votes
1answer
498 views

Problem with SerialIO package and Lego NXT

I'm following a guide from The Mathematica Journal that describes how to use Mathematica with the Lego Mindstorms NXT but have some trouble getting started and got stuck with the SerialIO package. I ...
5
votes
2answers
129 views

Reading non-tabular data with NaN-s from file

A NaN stands for an entry that is not a number/undefined/missing/infinite/etc. On my machine the C code printf("%f", 0/0.) produces ...
5
votes
1answer
123 views

How can I use Dynamic to run a script when a new file is added to a directory?

I have an external program saving files to some directory on my hard disc. I'd like to run a script that imports and runs a script on each file as it is added to the directory. Is there a simple way ...
5
votes
1answer
359 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 ...
4
votes
2answers
320 views

Cannot call custom function loaded from script using C/C++ MathLink

I am using MathLink with C/C++ on a Unix system in order to call a Mathematica (version 9) function and get the result. The function I need to call is a personal function of mine ...
4
votes
1answer
142 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 ...