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

learn more… | top users | synonyms (1)

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 ...
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?
9
votes
1answer
222 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 ...
1
vote
1answer
145 views

Converting code in other languages to Mathematica code

Do you know of any work being done on the idea of bringing in code from languages like PERL, PHP, Python, etc.? That is import the code in some way and then convert it to Mathematica code?
53
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 ...
9
votes
1answer
348 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 ...
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?
1
vote
0answers
69 views

Load a Mathematica Notebook using .Net code

I have gotten a tremendous amount of information from the question posted at (Load a Mathematica Package via .Net code), which my application is very similar to. Specifically in that thread, the ...
4
votes
1answer
327 views

RefProp in Mathematica

RefProp by NIST is a program that calculates the thermodynamic properties of fluids. I need to call certain RefProp functions ...
2
votes
1answer
123 views

Clojuratica setup

I am trying to get Clojuratica set up (MMa v 9 free trial) (on a Mac running Mavericks) I am following the instructions in "Clojure Data Analysis Cookbook" but have also followed the instructions: ...
2
votes
0answers
105 views

Calling Mathematica from Lazarus/Freepascal

I will appreciate if anyone can give me an hint about freepascal and mathematica mathlink communication. I'd like to build a Form using Lazarus/freepascal that call mathkernel. I'm trying to move ...
20
votes
3answers
780 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 ...
0
votes
1answer
135 views

Making a C++ callable .lib or .dll file from a Mathematica notebook [duplicate]

MATLAB supports conversions of their function files into C++ callable libraries. I was wondering if the same feature is also available in Mathemathica? If yes, can you please guide me where I can ...
2
votes
1answer
124 views

Exported PDF copy-and-pastable

Is it possible to export pdf documents that allow the user to copy and paste the exported code/text? The following table demonstrates what is pasted after copying the example symbols from a pdf ...
1
vote
1answer
162 views

Calling Mathematica from Java

I'm trying to write a Java program that uses Mathematica code, but when I compile it, a window appears asking for MathLink. I enter ...
5
votes
2answers
124 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 ...
11
votes
1answer
284 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 ...
4
votes
1answer
137 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 ...
18
votes
4answers
753 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 ...
1
vote
0answers
37 views

calling mathematica code in Python [duplicate]

I am wondering if there is any working example of calling mathematica 9 outputs in python? or plotting mathematica output in python?
6
votes
2answers
213 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. ...
2
votes
1answer
270 views

How do I resolve the “Specified file is not a MathLink executable” in SerialIO package?

I've read and tried the previous StackExchange suggestions here about installing the SerialIO package (including placing SerialIO in the same folder as init.m and and editing the init.m file per ...
3
votes
1answer
576 views

MathLink compile errors

Don't you just love it when your computer is working fine, you work with some good examples, everything is wonderful and your relationship with your computer is the best? I do. But what happens when ...
0
votes
0answers
91 views

calling a batch or executable application on Windows

How to run a batch file, send commands and collects output on windows Run["!C:\\runme.bat"] it outputs 1 and a window appears and then disappears. I also want ...
13
votes
1answer
682 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 ...
12
votes
4answers
468 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/
4
votes
1answer
149 views

Is it possible to interact with an external program's command-line interface?

I am performing a calculation in Mathematica which relies on calls to an external program that acts as a black box for calculating a function $f$, and I would like to know if it is possible for ...
10
votes
3answers
671 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, ...
5
votes
1answer
122 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 ...
13
votes
1answer
338 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
1answer
221 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 ...
2
votes
0answers
137 views

Interfacing with a LabJack

I have a LabJack U3-HV and I wanted to use it with Mathematica to interface some hardware. I cannot find any information on the Internet; if I have to use Python, I will, but I would rather use ...
3
votes
1answer
320 views

Using a different version of R with RLink on Windows 7

I'd like to run the R version installed in my Windows 7 system from within Mathematica 9 but when I execute the following command: ...
11
votes
1answer
290 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 ...
3
votes
1answer
125 views

String encoding issue with Pythonika

I use Mathematica and Pythonika to run Python code inside it. And I'm not quite sure what causes my issue: all unicode Python objects look like this: ...
3
votes
0answers
95 views

Eureqa Client to connect to Mathematica under Windows

Does there exist a way to use Eureqa software with Mathematica under Windows? That is, is there a working client to connect to a Eureqa server?
4
votes
2answers
316 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 ...
1
vote
1answer
146 views

How to send a function definition to MathLink from C/C++?

In this tutorial some MathLink concepts are introduced. At page 33 in the last lines the author is talking about sending to MathLink a function definition like ...
2
votes
1answer
123 views

Cannot run Mathematica C-interfacing examples 'factor'

I am trying to run a Mathematica example concerning Mathematica interfacing issues with C programs. In particular I am trying to call a Mathematica function from C. Example ...
10
votes
1answer
450 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, ...
11
votes
1answer
957 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 ...
21
votes
1answer
681 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 ...
6
votes
1answer
485 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 ...
9
votes
1answer
473 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 ...
24
votes
1answer
818 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, ...
3
votes
1answer
99 views

Reading RData files without RLink

I am using Mathematica 8. I would like to read some RData files which I have received. I do not currently have an installation of R on the machine with Mathematica.
10
votes
1answer
641 views

Load a Mathematica Package via .Net code

I'm using C# to pass data to Mathematica and return graphs: ...
14
votes
1answer
673 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: ...
10
votes
2answers
412 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?
4
votes
1answer
501 views

Mathematica 9 Linking with R

I would like to run a batch job from within the current Mathematica .m file using "R CMD BATCH &" (the job runs in the background when Mathematica proceeds with the current calculations. How can ...