Examples using Matlab and Python/NumPy:

% Matlab
f = 0.1;
time = [0; 1; 2; 3];
D0 = [cos(2*pi*f*time), sin(2*pi*f*time), repmat(1,length(time),1)]
# Python
import numpy as np
f = 0.1
time = np.array([0, 1, 2, 3])
D0 = np.array([np.cos(2*np.pi*f*time), np.sin(2*np.pi*f*time), np.ones(time.size)]).T
print(D0)

numpy.column_stack should do what you want. Example:

>>> a = np.array((0, 1))
>>> b = np.array((2, 1))
>>> c = np.array((-1, -1))
>>> numpy.column_stack((a,b,c))
array([[ 0,  2, -1],
       [ 1,  1, -1]])

It is essentially equal to

>>> numpy.vstack((a,b,c)).T
>>> np.vstack((a,b,c))
array([[ 0,  1],
       [ 2,  1],
       [-1, -1]])
>>> np.vstack((a,b,c)).T
array([[ 0,  2, -1],
       [ 1,  1, -1]])

import numpy as np # create column matrices mat1 = np.array([[1], [2], [3]]) mat2 = np.array([[4], [5], [6]]) # combine column matrices horizontally result = np.hstack((mat1, mat2)) print(result)