Tag Info

Hot answers tagged

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 ...


7

I would say JLink is one of the fastest ways to do this. Just use the Runtime to start a process executing your command and collect the exit code too: << JLink` RunThroughWithExitCode[cmd_String] := JavaBlock[Module[{ireader, istream, runtime, process, reader}, LoadJavaClass["java.lang.Runtime"]; runtime = Runtime`getRuntime[]; process = ...


7

I'll leave this up on GitHub, but I won't maintain the port. I recommend using MATLink instead. There's a package on the Wolfram Library Archive called mEngine that allows calling MATLAB from Mathematica. What it can do is: execute arbitrary MATLAB commands and retrieve their output as a string transfer array variables between Mathematica and MATLAB ...


6

Using a slightly modified version of vngx-jsch (source included), an open-source implementation of jsch, and JLink and a small but efficient Mathematica package this is now easily possible. All code can be browsed here, and most simply be installed by executing these lines: (tested on Windows and Linux, not on Mac). It should all work on Mathematica 7, 8 or ...


3

As Mr.Wizard pointed out, you can do this with ParallelSubmit. But you need a little more, and that's the (not so) tricky part as it is not very well documented. I think something like the following should work for you: Needs["Parallel`Developer`"] f[x_] := (Pause[x]; x) LaunchKernels[1] DistributeDefinitions[f] eid = ParallelSubmit[f@5] QueueRun[] Now ...


2

Parallel Kernels for separate Notebooks Perhaps you simply want to run two kernels in parallel. You can do this by: Open Evaluation > Kernel Configuration Options... and set up more than one kernel. Assign a different kernel to each of two Notebooks using Evaluation > Notebook's Kernel From there you can run your slow code in one Notebook and do your ...



Only top voted, non community-wiki answers of a minimum length are eligible