Octave: "sin(x)*cos(x); " brings back error

You need to use ".*" instead of "*". The former is the pointwise multiplication, the latter is the vector/matrix/tensor multiplication.