Page 1 sur 1

subst() cmd

Publié : lun. sept. 24, 2018 2:40 pm
par compsystems
subst(x^2 + 3*x + 5,[x=0,x=1,x=2,x=3,x=4]) // only acts on the firts element
=> 5
request
=>
subst(x^2 + 3*x + 5,[x=0,x=1,x=2,x=3,x=4]) => [5,9,15,23,33]

that performs the same function of seq( x^2 + 3*x + 5, x, [0, 1, 2, 3, 4]); => [5,9,15,23,33]