Ask Your Question

Revision history [back]

Hi,

I did not find anything in the documentation. But you can at least parse the ouptut of octave as a string:

sage: v = octave('[1,5,7]')                                       
sage: str(v)
'\n\n 1 5 7\n\n'
sage: vector(map(Integer,str(v).split()))
(1, 5, 7)

The function map juste evaluate the function Integer on each element of str(v).split() which is the list ['1','5','7']. The method split of strings is very useful: it splits a string at each space character.