| Hosted by CoCalc | Download
Kernel: SageMath 9.0
v = octave('[1,2,3]'); v
1 2 3
w = v.sage(); w
(1.0, 2.0, 3.0)
type(w)
<class 'sage.modules.vector_real_double_dense.Vector_real_double_dense'>
octave(list(w))
1 2 3

The interface does work fine even for large objects from Octave to Sage...

%time v = octave('rand(10000,1)')
CPU times: user 2.06 ms, sys: 854 µs, total: 2.91 ms Wall time: 10 ms
%time str(v.sage())[:100]
CPU times: user 117 ms, sys: 83.1 ms, total: 200 ms Wall time: 370 ms
'(0.664203, 0.0179095, 0.904956, 0.190342, 0.175247, 0.266967, 0.870426, 0.348108, 0.989566, 0.050856'

But it's slower going from Sage to octave:

%time k = octave(list(range(10000)))
CPU times: user 3.11 s, sys: 1.26 s, total: 4.36 s Wall time: 20.9 s

Plotting doesn't work here, but it does all work if you use a Sage worksheet instead (a .sagews file). See this worksheet

# does not work as expected octave('plot(rand(10))')
-34.2833 -33.3525 -32.8077 -31.919 -30.0698 -29.9493 -28.0861 -27.1922 -26.6632 -25.526