Sending matrixes to Mathematica from Clojuratica
After the previous recipe, we should be able to execute Mathematica functions from Clojure. We'll also need to send data to Mathematica so that there's something to call those functions on.
Getting ready
You must first have Clojuratica and Mathematica talking to each other. Either complete the Setting up Mathematica to Talk to Clojuratica for Mac OS X and Linux recipe or the Setting up Mathematica to Talk to Clojuratica for Windows recipe. Also, you'll need to have called the init-mma
function.
You'll also need to have Incanter listed in the dependencies in your project.clj
file:
(defproject interop "0.1.0-SNAPSHOT" :description "" :dependencies [[org.clojure/clojure "1.6.0"] [incanter "1.5.5"] [local.repo/JLink "9.0"] [local.repo/clojuratica "2.0"]] :source-paths ["src" "Clojuratica/src/clj"] :resource-paths ["src/main/resource" "/Applications/Mathematica.app/SystemFiles/Links...