>>> "John" == John Kitchin <jkitc...@andrew.cmu.edu> writes:
This message is from July, but meanwhile I upgraded to Ubuntu 16.04 matlab 2016b which includes the python engine/kernel and finally I installed the Jupiter matlab kernel via pip, however I tried to follow your recommendations below: > You might dig around in ob-octave to see how it works. It should be able > to Matlab (and on Linux/Mac I believe it might). On Windows, it has been > broken for a long time due to the lack of a proper shell (maybe that can > be adapted in win10 though). > I vaguely recall making that matlab function to try it out on Windows > some years ago. > There is a Jupyter Matlab kernel now. > https://github.com/Calyro/matlab_kernel > I was able to use this (and installing the kernel, and making sure a > matlab is on the path): > #+BEGIN_SRC emacs-lisp > (add-to-list 'org-src-lang-modes '("matlab" . matlab)) > ;; set default headers for convenience > (setq org-babel-default-header-args:matlab > '((:results . "output replace") > (:session . "matlab") > (:kernel . "matlab") > (:exports . "code") > (:cache . "no") > (:noweb . "no") > (:hlines . "no") > (:tangle . "no"))) > (defalias 'org-babel-execute:matlab 'org-babel-execute:ipython) > (defalias 'org-babel-prep-session:matlab 'org-babel-prep-session:ipython) > (defalias 'org-babel-matlab-initiate-session 'org-babel-ipython-initiate-session) > #+END_SRC > #+RESULTS: > : org-babel-matlab-initiate-session That I obtain > To enable this: > #+BEGIN_SRC matlab :results output org drawer > x = [1, 2, 3, 4, 5]; > fprintf('|%d', x) > #+END_SRC Here I obtain the following error: Debugger entered--Lisp error: (void-function org-babel-execute:matlab) org-babel-execute:matlab("x = [1, 2, 3, 4, 5];\nfprintf('|%d', x)" ((:colname-names) (:rowname-names) (:result-params "replace" "output" "drawer") (:result-type . output) (:results . "replace output drawer") (:exports . "code") (:session . "matlab") (:kernel . "matlab") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no"))) org-babel-execute-src-block(nil ("matlab" "x = [1, 2, 3, 4, 5];\nfprintf('|%d', x)" ((:colname-names) (:rowname-names) (:result-params "drawer" "output" "replace") (:result-type . output) (:results . "drawer output replace") (:exports . "code") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:kernel . "matlab") (:session . "matlab")) "" nil 671 "(ref:%s)")) org-ctrl-c-ctrl-c(nil) funcall-interactively(org-ctrl-c-ctrl-c nil) call-interactively(org-ctrl-c-ctrl-c nil nil) command-execute(org-ctrl-c-ctrl-c) What is the problem? Which package do I miss, ipython is installed in /usr/local/bin Thanks Uwe Brauer