I interact with the Gnu Octave's inferior mode and everything seems to be working fine there:
octave> pkg load symbolic
octave> syms x
g = (x+1)/sqrt(x^2 - 1)
simplify(diff(g,x))
octave> g = (sym)
x + 1
───────────
________
╱ 2
╲╱ x - 1
octave> ans = (sym)
-1
───────────────────
________
╱ 2
(x - 1)⋅╲╱ x - 1
Now I do the same using org mode and babel where I get an error:
#+begin_src octave :session :eval never-export :results verbatim
pkg load symbolic
syms x
g = (x+1)/sqrt(x^2 - 1)
ans = simplify(diff(g,x))
#+end_src
And when I evaluate the above code, I see the following error in the inferior mode's octave session:
octave> > > error: fprintf: wrong type argument 'class'
error: called from
dlmwrite at line 195 column 7
Any idea on what I'm doing wrong ?