Page 1 sur 1

problem with op() cmd

Publié : dim. déc. 09, 2018 3:37 pm
par compsystems
Hello BP

a := (0,1,2) ↵ returns 0,1,2, // a is a sequence
b := makevector(a) ↵ returns [1,2,3] // makeVector converts a sequence into vector
type(b) ↵ returns 'vector'

seqQR := qr([[1,2], [3,4]]) ↵ returns a sequence mq, mr
op(seqQR) ↵ returns Error: Bad Argument Value "
must return [ mq, mr ]

Re: problem with op() cmd

Publié : dim. déc. 09, 2018 6:01 pm
par parisse
op expects one argument (a list) and extracts the element of the lists as a sequence. If you pass a sequence with 2 args to op, you do the reverse, therefore you get an error and that's expected.

Re: problem with op() cmd

Publié : dim. déc. 09, 2018 8:29 pm
par compsystems
Sorry, op() cmd works well
the inverse operation to op() is makevector()
makevector(seqQR) // ok