MathLink is a suite of Mathematica functions that implement a protocol for the communication/interfacing of Mathematica with external programs.

learn more… | top users | synonyms

0
votes
0answers
18 views

choose a WSTP program to launch

When I run an external program(compiled by Visul C++ 2012 in windows 7) to use the wolframkernal by WTSP, for example:project1.exe -linkmode launch,it will open a dialog box named "choose a WSTP ...
8
votes
1answer
73 views

Installing LinkSnooper on Windows

I tried to install LinkSnooper on my Windows 7 computer, as described in the documentation and here. According to the answer of @Todd Gayley, I entered the following string in the field MLOpen: ...
3
votes
1answer
81 views

How to use RunProcess to import external function?

I have a functions written in an external language called GO. How can I quickly load them into the kernel for use as Mathematica functions? The two ways I've tried are with MathLink and LibraryLink ...
1
vote
0answers
24 views

Configuring remote access when using a VPN

To address some of the responsiveness issues, I use the Mathematica front end (v9 or v10) to access a remote kernel on a Raspberry Pi. The (advanced) kernel configuration used is this: Arguments to ...
5
votes
1answer
35 views

Changing MathKernel process priority on the startup

In the built-in Documentation there is an example how it is possible to change the priority of the MathKernel process using NetLink: ...
2
votes
0answers
60 views

webMathematica - MathLink linkname missing or malformed

I just installed webMathematica on Linux Debian + Tomcat7 + Mathematica 9.0. I'm getting this error web testing any example. HTTP 403 - MathLink linkname missing or malformed. The error is also ...
2
votes
0answers
75 views

Generating Mathlink executables by CCompilerDriver

I'm trying to generate a MathLink executable by CreateExecutable from CCompilerDriver ...
4
votes
1answer
43 views

what's the meaning of “-mathlink” as part of Arg for LinkLaunch?

LinkLaunch["MathKernel -mathlink"] LinkLaunch["MathKernel"] The both code line above can launch a MathKernel. What's the difference of them? what's the meaning of ...
0
votes
0answers
16 views

what's the difference between CreateKernelLink() and CreateKernelLink(String Arg)?

I have a .NET program which will connect to MathKernel. When the program runs, there will be a icon of MathKernel on the taskbar. ...
0
votes
2answers
51 views

Is there anyway to use a named argument in calling mathematica from .NET?

I want to write a .NET program calling Mathematica as a computing engine. But here is a problem that argument a1 is not a constant and its value depends on ...
9
votes
1answer
322 views

WSTP broken by upgrade to 10.0.1?

Ubuntu 12.04, Mathematica 10.0.1. Everything was working fine with WSTP (the successor to MathLink) in 10.0.0. But I upgraded to 10.0.1 today and now I can't compile either my programs (I've changed ...
6
votes
1answer
90 views

MathLink error while calling a custom Mathematica function - MLGet out of sequence

I am trying to call Mathematica 10 from F#. Following the C# sample code found in the Mathematica directory, I have written the following F# code: ...
0
votes
0answers
64 views

Data acquisition from NI USB-6008, NI-DAQmx

I want to connect an interface from National Instruments to Mathematica in mac, i already download the driver Ni-DAQmx_Base_3.6 from NI page. How to tell Mathematica to dump data from the interface?
7
votes
1answer
124 views

Connect Frontend to Kernel Started by JVM via JLink

I have a MathKernel started and controlled via JLink from a JVM. The $CommandLine for this kernel is: ...
2
votes
0answers
73 views

Mathlink program with low cpu usage on linux machines only

Question I am incorporating some c++ code via Mathlink into my simulations in Mathematica. My questions involves the execution efficiency of the c++ code on different machines. For example, on my ...
3
votes
0answers
48 views

WSTP Callbacks into CDF

Essentially, what I am trying to find out is the limitation of the WSTP/LINK protocols in Enterprise-licensed CDF. Specifically, are any callbacks to the kernel from those protocols allowed in CDF , ...
1
vote
0answers
52 views

Mathlink and Fortan: A list with more than 10 elements as result [closed]

I have a problem with Mathlink (Mathematica 9.0), form which I call a Fortran subroutine which should return a list of 13 numbers. I have written a C-wrapper to call the Fortran subroutine (called ...
3
votes
1answer
59 views

How to wait until a Listen mode link gets connected to?

Suppose we create a link like this: link = LinkCreate["mylink", LinkMode -> Listen] How can we wait until this link gets connected to by another process, and ...
2
votes
0answers
90 views

Cannot launch MathLink from C

I am trying to launch a MathLink from a 64bit C dll that I am building, using the following code: ...
5
votes
1answer
108 views

Undocumented WolframLibraryData::evaluateExpression

It seem there's this promising function in the callback object provided to MathLink C functions: ...
1
vote
0answers
33 views

Correct use of Mathlink's MLGetRealList

I am attempting to use Mathlink from C. I have managed to return single values from mathlink to my c program, but I am having trouble with lists. Consider the Mathematica operation: ...
4
votes
1answer
101 views

How to do assignments through MathLink?

In Mathematica I can make the assignment 'foo = bar' with Set[foo,bar]. However, if I try to evaluate 'Set[foo,bar]' through MathLink then it appears that MathLink gets stuck while trying to read ...
2
votes
1answer
144 views

MathLink c++ passing lists of real values simple example

So this may come down to me not being a very competent programmer but I am struggling with passing list from Mathematica via MathLink that aren't of integers. The final code I am hoping to get out of ...
3
votes
1answer
63 views

How to return escaped characters from MathLink?

I'd like to return Greek symbols through MathLink from a C function. However, returning the usual escape sequence (such as \[Alpha]) does not seem to work. Here's a minimal example .tm file ...
0
votes
0answers
146 views

Visual Studio 2013 Mathlink addtwo

I was needing to use Mathlink to call some c++ code so I thought I would learn from the basic examples but I am running into strange issue. Following the procedure outlined from the Mathematica ...
0
votes
0answers
45 views

Multiple scripts run using same kernel

I have an external program that calls Mathematica scripts upon certain events. Each script requires a large Mathematica library to load (takes a while). Is there some way to run an initial script ...
5
votes
0answers
96 views

Can Apple's Numbers spreadsheet link to a Mathematica function?

I use Apple's Numbers spreadsheet for a single thing, a double entry accounting model to understand complicated financial transactions. A current model depends on the value of a single initialization ...
2
votes
0answers
58 views

Pass Real32 to Mathlink

I've written a Mathlink program that is called from Mathematica 9. It works very well but currently uses double precision numbers in the C++ function. I've already replaced them with floats in C++ ...
0
votes
0answers
42 views

Reading Error Message from Mathematica using Mathlink C++

I am developing an UI on Visual Studio C++ and communicating with Mathematica using Mathlink. I create a function via Mathlink and in that function, I coded in such a way that it gives a message ...
11
votes
1answer
319 views

Multiplayer game in Mathematica: how to communicate between kernels?

This may have been asked already, but I am considering making a game in Mathematica that two people can play. However, the issue with my idea is that the other player can't view the cards of the first ...
1
vote
1answer
72 views

Hide MathKernel Tab on Taskbar when using C++ [duplicate]

I am connecting to MathKernel.exe using C++ via MathLink on Windows. Hence, to create the link, this is what I use: ...
1
vote
0answers
92 views

Read expression from Mathematica via Mathlink C++

This is a simple C++ program to send an expression to the_Mathematica_ Kernel and get its response. ...
1
vote
1answer
55 views

MLEvaluate() Function Gives Error

I am trying to link my C++ program to Mathematica Kernel. I am trying to use the MLEvaluate() evaluate but I receive an error while compilation. My codes are as below: ...
1
vote
2answers
178 views

MathLink Graphical Output (Plots) to File

In a custom Mathematica frontend based on MathLink I try to make use of plots produced in Notebooks. The idea is to write them to files whenever they get produced. According to C-code snippets I ...
0
votes
0answers
42 views

MathLink wrapper for NIntegrate

I wonder if I can benefit from the Mathematica numerical quadrature routines in a way which integrates completely into an existing C-program. To be more specific I have C-program which does numerical ...
0
votes
0answers
41 views

Set form of all output to InputForm

I try to interact with mathematica using MathLink for symbolic computations. By default it returns strings such as 2\012-1 + E\012-------\012 3\012 E if the ...
0
votes
0answers
48 views

Compiling Visual Studio C++ to Run on Computers without Mathematica [duplicate]

I have written a console application on Visual Studio C++ as below ...
2
votes
0answers
119 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 ...
4
votes
1answer
157 views

Passing Mathematica function via MathLink or LibraryLink to c (or c++)

I want to numerically solve the heat equation. To do so I wrote a program in C++ - It is a BVP $(\alpha T +\kappa \frac{\partial T}{\partial r}=f(t))$, where $f(t)$ is an arbitrary function, whose ...
2
votes
1answer
310 views

Creating a C++ project with Visual Studio 2010

I am trying to create a GUI using Microsoft Visual Studio C++ 2010 by calling Mathematica in my codes. I have done everything step by step as mentioned here Then I wrote this code as mentioned in ...
1
vote
1answer
244 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 ...
6
votes
1answer
109 views

LinkSnooper troubles on Windows

I'm trying to get LinkSnooper up and working on a Windows 7 machine to monitor the interaction between the Mathematica front end and MathLink. I'm facing great troubles following the instructions ...
0
votes
0answers
57 views

Can you set up a remote kernel for computation and a local kernel for predictive interface?

I am able to launch remote kernels from my Windows box to our Linux cluster that has the data I need and the capacity to run analysis (numerous & speedy cores, spacious memory, etc.). Works ...
2
votes
2answers
104 views

J/Link: getArray2() returns wrong array

I want to convert a matrix from Mathematica to an int[][] in Java. I use the code below: ...
0
votes
1answer
75 views

How to close all other MathKernel before opening the new one?

I use MathLink to call Mathematica from C program. After any opening to Mathematica, I do close the connection. However, I don't know why some connections are ...
2
votes
1answer
161 views

Mathlink works strangely

I have problem when using mathlink, the source code is quite simple: ...
9
votes
3answers
12k views

MathLink linking error after OS X 10.9 (Mavericks) upgrade

After macosx 10.9 mavericks upgrade i have a compilation problem, you can see below. Even the examples given in ...
2
votes
1answer
74 views

Read return value as string by Mathlink.h

I'm using "mathlink.h" to call Mathematica from a C program. I send a computation to Mathematica and its return result is a very big number (100 digits). Hence, I want to read that number as a string. ...
17
votes
1answer
500 views

Calling Mathematica from Visual Studio - example

I am trying to set up a connection between Visual Studio 10 and Mathematica 8.0 on a Windows system. I found several sources of information on the Wolfram website, but I get entirely lost. Most of the ...