Tag Info

New answers tagged

3

This issue was caused by a bug in Pythonika. Fix is now available at http://hg.aplavin.ru/pythonika/, will send it to the author.


5

After you call Get, you run a packet loop, waiting for the ReturnPacket. But you never read or discard the contents of that ReturnPacket. That means that the whatever expression that Get returns (it will be the result of last evaluation in the myscript.m file, perhaps the symbol Null) is still waiting on the link. Then you call your function and wait for the ...


4

Forgive me my ignorance to not try your sample code and instead give you an idea for a completely different approach. Since you are just launching a MathKernel in your MathLink program, why don't you use the -run option, to load your package during the launch? You can test this directly in the front end kernel = LinkLaunch[ First[$CommandLine] <> ...


3

Section 2.3.1 of the document you linked details how you can send things to the kernel. The main point here is that you can send a function definition like you send any other Mathematica input. I doesn't matter that it's a function definition. It's just an expression like any other. If you send as an expression, remember its full form: ...


3

I'm not sure why it doesn't work for you. Try using the full path to the kernel executable. The following works for me on OS X: ./factor -LinkMode Launch -LinkName '/Applications/Mathematica\ 9.app/Contents/MacOS/MathKernel' I do have a symlink to MathKernel in a location that's in the PATH, but if I use that, as in ./factor -LinkMode Launch -LinkName ...


23

Note: If you're using this package, please let us know how! Understanding how people use it helps us improve it in the right areas. There is a new cross platform package for this, called MATLink. It allows calling MATLAB functions seamlessly, directly from Mathematica, as well as transferring data between the two systems. See below for a small ...


5

I've got VBA calling Mathematica functions. It's not without issues, but maybe some other smart people here can help with the hiccups. First things first: The .dll that Mathematica includes with its installation for .NETLink is not COM-compatible, meaning that VBA cannot find entry points into the dll functions. To get around this, .NET must be installed ...


14

Have a look at this; http://reference.wolfram.com/mathematica/guide/MathLinkCLanguageFunctions.html I haven't used it in C/C++ but it works fine in C# and Java. Basically you create a connection to a Mathematica kernel and then pass it native data types. Works nicely. Here is some sample code in Java that I used when I first did this; import ...



Top 50 recent answers are included