I want to create a re-usable matlab org-babel source block vectsb
(say), which takes two vectors from a call statement, performs some operations with them, and returns the result in the call statement. A MWE is as follows
#+NAME: vectsb
#+begin_src matlab :var a=[0], b=[0] :session
a+b
#+end_src
#+CALL: vectsb(a=[1,2,3],b=[3,2,1])
#+RESULTS:
| 1040 | 650 |
I am getting this type of errors in the input arguments
a=[1 (, 2) (, 3)];
|
Error: Invalid expression. When calling a function or indexing a variable, use
parentheses. Otherwise, check for mismatched delimiters.
No matter how much I read the org-babel manual I can't figure out what I am doing wrong. Partly because there are few examples for Matlab.