Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to multiply vector by number

I have vector

W = [1, 8, 4, 7, 10, 1, 6, 3]

I need to multiply it by number, but command 2*W gives just concatenated vector by itself

[1, 8, 4, 7, 10, 1, 6, 3, 1, 8, 4, 7, 10, 1, 6, 3]

I dont need it, I need multiply all elements of vector to number